用JAVASE完成一个图书管理系统

1.核心需求

1 、简单的登录
2 、管理端
整理书籍 ( 该功能为可扩展功能 )
查阅书籍
增加书籍
删除书籍
打印书籍列表
退出
3 、用户端
查询书籍
借阅书籍
归还书籍
退出
所以先创建三个包
1.book 2.operation 3.user
book包中创建Book和BookList两个类
Book类代码
package book;

public class Book {
    private String name;
    private String author;
    private String type;
    private int price;
    private boolean isBorrowed;
    public Book(String name,String author,String type,int price,boolean isBorrowed) {
        this.name=name;
        this.author=author;
        this.type=type;
        this.price=price;
        this.isBorrowed=false;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public boolean isBorrowed(boolean b) {
        return isBorrowed;
    }

    public void setBorrowed(boolean borrowed) {
        isBorrowed = borrowed;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", type='" + type + '\'' +
                ", price=" + price
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值