文档详情

图书管理系统java代码.doc

发布:2017-03-19约9.18千字共21页下载文档
文本预览下载声明
图书管理系统java代码 import java.util.*; class BookInfo { BookInfo() { num = -1; bookName = No information; author = No information; press = No information; ISBN = No information; borrowed = No; } BookInfo( String sbn, String sa, String sp, String sISBN ) { int n = Menus.NUMBER; num = n; bookName = sbn; author = sa; press = sp; ISBN = sISBN; borrowed = No; } public void setNum( int n ) { num = n; } public void setBookName( String n ) { bookName = n; } public void setAuthor( String a ) { author = a; } public void setPress( String p) { press = p; } public void setISBN( String i ) { ISBN = i; } public void setBorrowed( String i ) { borrowed = i; } public int getNum() { return num; } public String getBookName() { return bookName; } public String getAuthor() { return author; } public String getPress() { return press; } public String getISBN() { return ISBN; } public String getBorrowed() { return borrowed; } public void disp() { System.out.println( getNum() + \t + getBookName() + \t\t + getAuthor() + \t\t + getPress() + \t\t + getISBN() + \t + getBorrowed() ); } private int num; private String bookName;// 书名 private String author; // 作者 private String press; // 出版社 private String ISBN; // 每本书有唯一的ISBN号码 private String borrowed;// 是否被借出 } class Menus { BookInfo[] numOfInfo; Scanner s = n
显示全部
相似文档