C 大型实验之图书管理系统源代码(仅供参考).docVIP

  • 2
  • 0
  • 约7.4千字
  • 约 9页
  • 2017-08-25 发布于河南
  • 举报

C 大型实验之图书管理系统源代码(仅供参考).doc

//book类 #ifndef HEADER_BOOK #define HEADER_BOOK #includestring #includeiostream #includeiomanip using namespace std; class Book{ public: string bno;//书号 string bname;//书名 string author;//作者 string press;//出版社 int storenum;//现有藏书量 int borrownum;//借出数 Book *next; Book(); void print(); }; #endif #include Book.h extern Book *books; Book::Book(){next=0;} void Book::print(){ coutsetw(7)setfill( )书号; coutsetw(25)setfill( )书名; coutsetw(10)setfill( )作者; coutsetw(20)setfill( )出版社; coutsetw(7)setfill( )藏书量; coutsetw(7)setfill( )借出数endl; coutsetw(7)setfill( )bno; coutsetw(25)setfill( )bname; coutsetw(10)setfill( )author; coutsetw(20)setfill( )press; coutsetw(7)setfill( )storenum; coutsetw(7)setfill( )borrownumendl; } //borrow类 //主要是读者借书信息保存 #ifndef HEADER_BORROW #define HEADER_BORROW #include string #include iostream using namespace std; class Borrow{ public: string readernumber; string booknumber; Borrow *next; Borrow(); }; #endif #include borrow.h #include iostream using namespace std; extern Borrow *borrows; Borrow::Borrow(){next=0;} //DBFile类 //==================== //DBFile.h//数据操作类 //==================== #ifndef HEADER_DBFILE #define HEADER_DBFILE #include iostream #include fstream #include string #include Reader.h #include Worker.h #include Manager.h #include Book.h #include borrow.h using namespace std; class DBFile{ public: DBFile(); void Read_bookdata_outfile();//将book数据读出文件到链表里 void Write_bookdata_infile();//将book链表数据写入到文件里 void Read_readerinfo_outfile();//将读者信息读出文件到链表 void Write_readerinfo_infile();//将读者链表数据写入到文件里 void Read_workerinfo_outfile();//将工作人员信息读出文件到链表 void Write_workerinfo_infile();//将工作人员链表数据写入到文件里 void Read_managerinfo_outfile();//将管理人员信息读出文件到链表 void Write_managerinfo_infile();//将管理人员链表数据写入到文件里 void Read_borrowdata_outfile();//将读者借书信息读出文件到链表 void Write_borrowdata_infile();//将读者借书信息链表数据写入到文件里 }; #endif #include DBFile.h using namespace std; extern Book *books; extern Worker *workers; extern Reader *

文档评论(0)

1亿VIP精品文档

相关文档