图书管理系统(个人练习)

这是一篇关于个人练习实现图书管理系统的博客。主要内容包括对图书(Book)的管理以及图书列表(BookList)的展示,还有整个系统的主体部分(Main)的介绍。
摘要由CSDN通过智能技术生成

目录:

 

Book

package com.ys.book;

public class Book {
    private String name;
    private String author;
    private int price;
    private String type;
    private boolean isBorrowed;

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

    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 int getPrice() {
        return price;
    }

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

    public String getType() {
        return type;
    }

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

    public boolean isBorrowed() {
        return isBorrowed;
    }

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

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", price=" + price +
                ", type='" + type + '\'' +
                ", " + (isBorrowed ? "已经被借走":"未被借走") +
                '}';
    }
}

BookList

package com.ys.book;

public class BookList {
    private Book[] books;
    private int usedSize;

    public BookList() {
        this.books = new Book[10];
        this.books[0] = new Book("三国演义","罗贯中",88,"小说");
        this.books[1] = new Book("西游记","吴承恩",77,"小说");
        this.books[2] = new Book("水浒传","施耐庵",66,"小说");
        this.books[3] = new Book("红楼梦","曹雪芹",55,"小说");
        this.use
利用VS2013 Update5在唐大仕老师源代码的基础上编写的私人图书馆管理系统,用到的技术主要有:C#有关文件、数据库、图形化界面等方面的知识。 本程序的主要功能:  1.默认页提供关于图书馆的基本信息(ID、类别、书名、装帧、作者、关键字、出版社、出版年代、定价、统一书号、页数、购书地点、是否读完等); 2.图书馆管理者必须先登录才能了解图书馆的详细信息,并可以对图 书进行添加、查找、修改、删除等的操作,还可进行管理与归类; 3.可以显示图书的ISBN的二维码; 使用说明: 1.信息的存储与读取,Access数据库,你的电脑可能需要安装AccessDatabaseEngine.exe(位于Debug目录下); 2.二维码使用的是zxing类库(zxing.dll位于Debug目录下,已经引入); 3.软件主要在DPI为125的屏幕下调试,DPI为100时控件可能有错位,大家可以自行修改(不过本人坚持认为125的文本尺寸对眼睛有利),也可编写自动适应DPI的方法并Load之; 关于注释: 本人一直人认为不注释才是最好的注释,程序代码应该简洁清晰易懂,所以除了唐老师原有的注释,本人几乎不作注释,这样做的好处是当我改变代码后,不必为忘了改注释而烦恼。 尚未完成的功能: 1.可以结合RichTxtBox,给每本图书来个图文并茂的简介,简介文件可以读取保存编辑,并与书名同名(书名+.rtf); 2.查询可以增加其他字段如关键字的查询; 3.书目录入可以增加更多字段(本人更喜欢在DataGridView上直接增删改);
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值