64 lines
1.3 KiB
Java
64 lines
1.3 KiB
Java
package com.demo;
|
|
|
|
public class BookBean {
|
|
// 定义私有属性
|
|
private String bookid;
|
|
private String title;
|
|
private String author;
|
|
private String publisher;
|
|
private double price;
|
|
|
|
// 无参数构造方法
|
|
public BookBean() {
|
|
}
|
|
|
|
// 带参数构造方法
|
|
public BookBean(String bookid, String title, String author, String publisher, double price) {
|
|
this.bookid = bookid;
|
|
this.title = title;
|
|
this.author = author;
|
|
this.publisher = publisher;
|
|
this.price = price;
|
|
}
|
|
|
|
// Getter和Setter方法
|
|
public String getBookid() {
|
|
return bookid;
|
|
}
|
|
|
|
public void setBookid(String bookid) {
|
|
this.bookid = bookid;
|
|
}
|
|
|
|
public String getTitle() {
|
|
return title;
|
|
}
|
|
|
|
public void setTitle(String title) {
|
|
this.title = title;
|
|
}
|
|
|
|
public String getAuthor() {
|
|
return author;
|
|
}
|
|
|
|
public void setAuthor(String author) {
|
|
this.author = author;
|
|
}
|
|
|
|
public String getPublisher() {
|
|
return publisher;
|
|
}
|
|
|
|
public void setPublisher(String publisher) {
|
|
this.publisher = publisher;
|
|
}
|
|
|
|
public double getPrice() {
|
|
return price;
|
|
}
|
|
|
|
public void setPrice(double price) {
|
|
this.price = price;
|
|
}
|
|
} |