打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
MySQL+SERVLET+JAVABEAN+JSP图书管理系统1
1、创建数据库
CREATE TABLE tb_books(
id INT  unsigned NOT NULL AUTO_INCREMENT,
name VARCHAR(45) NOT NULL,
price DOUBLE NOT NULL,
bookCount INT unsigned NOT NULL,
author VARCHAR(45) NOT NULL,
PRIMARY KEY(id)
);

2、创建Book类
package Library.info;


public class Book implements Comparable<Object>{
private String name;
public  int id;
private int bookCount;//数量
private Double price;
private String author;
public Book(){} //空参构造函数
public Book(int id, String name, Double price, String author)
{
this.id = id;
this.name = name;
this.price = price;
this.author = author;
}

public int getId()
{
return id;
}
public void setId(int id)
{
this.id = id;
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public Double getPrice()
{
return price;
}
public void setPrice(Double price)
{
this.price = price;
}
public String getAuthor()
{
return author;
}
public void setAuthor(String author)
{
this.author = author;
}
public int getBookCount() {
return bookCount;
}

public void setBookCount(int bookCount) {
this.bookCount = bookCount;
}
}

3、创建包com.lyq.bean
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Eclipse中java向数据库中添加数据,更新数据,删除数据
hibernate 一对一实践
编写一个代码以显示这些详细信息。
List 根据属性排序
其实我想说我也有棵树:带线的无限级树(可以应用在任何地方,只要你想)
Hibernate实例
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服