📄 bookitem.java
字号:
package examples;
import java.sql.*;
import javax.naming.*;
import javax.ejb.*;
import java.util.*;
import java.rmi.RemoteException;
import javax.naming.*;
/**
* A Bookitem is details about the Book.
*
*/
public class BookItem implements java.io.Serializable {
/*
* Base price of the Book
*/
private double basePrice;
/*
* Name of the Book
*/
private String name;
/*
* Description of the Book
*/
private String description;
/*
* Book id
*/
private String bookId;
/**
* Constructor
* @param bookid
* @param name of the book
* @param price of the book
* @param description of the book
*/
public BookItem(String bookId, String name, double price,String description) {
System.out.println("BookItem(...) called");
this.bookId = bookId;
this.basePrice = price;
this.name = name;
this.description=description;
}
/**
* Returns the Book id.
*/
public String getBookID(){
return bookId;
}
/*
* Sets the Book id.
*/
public void setBookID(String bookId){
this.bookId=bookId;
}
/**
* Returns the name of the Book.
*/
public String getName(){
return name;
}
/**
* Sets the name of the Book.
*/
public void setName(String name){
this.name=name;
}
/**
* Returns the description of the Book.
*/
public String getDescription(){
return description;
}
/**
* Sets the description of the Book.
*/
public void setDescription(String description){
this.description=description;
}
/**
* Returns the base price of the Book.
*/
public double getBasePrice(){
return basePrice;
}
/**
* Sets the base price of the Book.
*/
public void setBasePrice(double price){
this.basePrice=price;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -