分享

MySQL+SERVLET+JAVABEAN+JSP图书管理系统1

 weixiaofeng01 2017-03-07
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

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多