数据结构课程设计图书管理系统

上传人:桔**** 文档编号:447344851 上传时间:2023-08-18 格式:DOC 页数:17 大小:57.50KB
返回 下载 相关 举报
数据结构课程设计图书管理系统_第1页
第1页 / 共17页
数据结构课程设计图书管理系统_第2页
第2页 / 共17页
数据结构课程设计图书管理系统_第3页
第3页 / 共17页
数据结构课程设计图书管理系统_第4页
第4页 / 共17页
数据结构课程设计图书管理系统_第5页
第5页 / 共17页
点击查看更多>>
资源描述

《数据结构课程设计图书管理系统》由会员分享,可在线阅读,更多相关《数据结构课程设计图书管理系统(17页珍藏版)》请在金锄头文库上搜索。

1、/*这是本人大二做数据结构课程设计的一个题目 已编译通过用户首先以管理员身份登陆 初始密码000000然后再添加图书和其他用户 程序中还有许多问题 ,有好的意见可以提出来 谢了*/#include#include#include#include#include#include #include#includeusing namespace std;/*书类定义*/class Bnodeprivate:string B_name; /书名 string B_author; /作者string B_no; /编号string B_pub; /出版社 int B_sum; /馆藏量 bool tok

2、e; / 是否可借标记 string bow_time; /借书时间 string ret_time; /还书时间Bnode *next;public:Bnode()next=NULL;Bnode()friend class Administrate;friend class Unode;/*用户类定义*/class Unodeprivate:string U_name,U_password;Bnode *borrow,*history,current;Unode *next;public:Unode(string password=000000) borrow=new Bnode; hist

3、ory=new Bnode; next=NULL; U_password=password; Unode()Unode* enter(Unode *h);void search_Book(Bnode *h);void guanli(Bnode *h1,Unode *h2);void bowrrow_Book(Bnode *h1,Unode *h2);void return_Book(Bnode *h1,Unode *h2);void show_current(Unode *h);void show_history(Unode *h);void setcode(Unode *h);friend

4、class Administrate;/*管理员定义*/class Administrateprivate:string A_password;public: Administrate(string password=000000)A_password=password;Administrate()void enter();void add_Unode(Unode *h); void add_Bnode(Bnode *h);void show_Unode(Unode *h);void show_Bnode(Bnode *h);void delete_Unode(Unode *h);void d

5、elete_Bnode(Bnode *h);void setcode();void main()int code,code1,code2;Administrate A;Unode *user,U,*u;Bnode *book,B,*b;user =new Unode;book =new Bnode;cout *endl;cout * 图书管理系统 *endl;cout * *endl; cout * *endl; cout * *endl; cout * *endl; cout * *endl; cout * 版权所有:Jason *endl;cout *endl;loop:coutcode;

6、switch(code)case 1: A.enter(); system(cls); system(date /t); system(time /t); do cout * endl;cout * 1 添加用户 * endl; cout * 2 删除用户 * endl; cout * 3 添加图书 * endl;cout * 4 删除图书 * endl; cout * 5 修改密码 * endl; cout * 6 返回登录界面 * endl; cout * endl;cout code1;switch(code1)case 1:system(cls); A.add_Unode(user);

7、 A.show_Unode(user); coutendl; break;case 2:system(cls); A.delete_Unode(user); A. show_Unode(user); break;case 3:system(cls); A.add_Bnode(book); A.show_Bnode(book); break;case 4:system(cls); A.delete_Bnode(book); A.show_Bnode(book); break;case 5:system(cls); A.setcode(); break;case 6:system(cls);got

8、o loop;break;while(code=6);break;case 2: u=U.enter(user); do system(cls); system(date /t); system(time /t); cout*endl; cout*1 图书查询 * endl; cout*2 借阅管理 * endl; cout*3 修改密码 *endl; cout*4 退出登陆 *endl; cout*endl; cout请选择操作类型 code2; switch(code2) case 1: system(cls); U.search_Book(book);break; case 2: system(cls);U.guanli(book,u);break; case 3: system(cls);U.setcode(u);break; case 4: system(cls); goto loop;break; while(code=4); break; /switch end/main end/*管理员登陆函数定义*/void Administrate:enter() char ss7; cou

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 大杂烩/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号