资源简介
北邮大二下学期数据结构课程设计题目-图书馆管理系统,压缩包包含源代码和工程文件,实现了题目要求的增删改查,数据统计,欠费处理,文件存取等功能。

代码片段和文件信息
/*此cpp主要包含对图书的操作*/
#include
#include
#include“Library.h“
using namespace std;
void Book_operate() //图书信息管理操作
{
char i;
do{
cout<<“ ┌──────────────────────┐\n“;
cout<<“ │---------------图书信息管理-----------------│\n“;
cout<<“ │服务项目: │\n“;
cout<<“ │ 1 增加 │\n“;
cout<<“ │ 2 删除 │\n“;
cout<<“ │ 3 显示 │\n“;
cout<<“ │ 4 修改 │\n“;
cout<<“ │ 0 返回 │\n“;
cout<<“ └──────────────────────┘\n“;
cout<<“请选择服务项目:“;
cin>>i;
switch(i){
case‘1‘:
add_book();
break;
case‘2‘:
del_book();
break;
case‘3‘:
print_all();
break;
case‘4‘:
Book_modify();
break;
case‘0‘:
break;
default:
cout<<“输入无效“< Book_operate();
break;
}
}while(i!=‘0‘);
return;
}
void add_book() //增加图书
{
Bcurrentptr=new Book;
if(Bheadptr==NULL){
Bheadptr=Bcurrentptr;
Blastptr=Bcurrentptr;
}
if(Bcurrentptr!=NULL){
cout<<“请输入书籍信息:“< cout<<“ISBN:“;
cin>>Bcurrentptr->ISBN;
cout<<“名称:“;
do gets(Bcurrentptr->Bname); while(!Bcurrentptr->Bname[0]);
cout<<“作者:“;
do gets(Bcurrentptr->Author); while(!Bcurrentptr->Author[0]);
cout<<“出版社:“;
cin>>Bcurrentptr->Press;
cout<<“类型:“;
cin>>Bcurrentptr->Type;
cout<<“简介:“;
do gets(Bcurrentptr->Intro); while(!Bcurrentptr->Intro[0]);
cout<<“数量:“;
cin>>Bcurrentptr->Num;
Bcurrentptr->Date=day;
Bcurrentptr->Remain=Bcurrentptr->Num;
Bcurrentptr->Code[0]=Bcurrentptr->Type[0];
Bcurrentptr->Code[1]=Bcurrentptr->Type[1];
Bcurrentptr->Code[2]=Bcurrentptr->Press[0];
Bcurrentptr->Code[3]=Bcurrentptr->Press[1];
Bcurrentptr->Code[4]=sptr[0];
Bcurrentptr->Code[5]=sptr[1];
Bcurrentptr->Code[6]=sptr[2];
Bcurrentptr->Code[7]=sptr[3];
Bcurrentptr->Code[8]=sptr[4];
Bcurrentptr->Code[9]=‘\0‘;
serial();
for(int i=0;i<10;i++)
Bcurrentptr->reader[i]=NULL;
Blastptr->nextptr=Bcurrentptr;
Blastptr=Bcurrentptr;
Blastptr->nextptr=NULL;
cout<<“添加成功“< }
else
cout<<“添加失败“< Save_book();
}
void Book_modify() //修改图书
{
int n;
printf(“\n请选择输入图书的方式:\n\t1-名称\n\t2-ISBN\n\t3-内部编号\n“);
search_book(‘0‘);
if(Bcurrentptr==NULL)
return;
cout<<“请输入增加本数:“;
cin>>n;
Bcurrentptr->Num+=n;
Bcurrentptr->Remain+=n;
Save_book();
}
void del_book() //删除图书
{
search_book(‘3‘);
if(Bcurrentptr!=NULL)
{
if(Bcurrentptr->Num!=Bcurrentptr->Remain)
{
printf(“此书有人借,无法删除!\n“);
return;
}
if(Bcurrentptr==Bheadptr)
Bheadptr=Bcurrentptr->nex
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 6330 2013-06-05 18:09 Library\Book.cpp
文件 3335 2013-06-05 18:09 Library\File.cpp
文件 118 2013-11-25 11:35 Library\Library\Library\Book.txt
文件 193578 2013-11-25 11:34 Library\Library\Library\Debug\Book.obj
文件 6736 2013-11-25 11:34 Library\Library\Library\Debug\cl.command.1.tlog
文件 106000 2013-11-25 11:34 Library\Library\Library\Debug\CL.read.1.tlog
文件 6138 2013-11-25 11:34 Library\Library\Library\Debug\CL.write.1.tlog
文件 292560 2013-11-25 11:34 Library\Library\Library\Debug\File.obj
文件 60 2013-11-25 11:34 Library\Library\Library\Debug\Library.lastbuildstate
文件 4408 2013-11-25 11:34 Library\Library\Library\Debug\Library.log
文件 184498 2013-11-25 11:34 Library\Library\Library\Debug\Library.obj
文件 2 2013-11-25 11:34 Library\Library\Library\Debug\li
文件 2 2013-11-25 11:34 Library\Library\Library\Debug\li
文件 2 2013-11-25 11:34 Library\Library\Library\Debug\li
文件 2 2013-11-25 11:34 Library\Library\Library\Debug\li
文件 2 2013-11-25 11:34 Library\Library\Library\Debug\li
文件 2 2013-11-25 11:34 Library\Library\Library\Debug\li
文件 2 2013-11-25 11:34 Library\Library\Library\Debug\li
文件 2 2013-11-25 11:34 Library\Library\Library\Debug\li
文件 2 2013-11-25 11:34 Library\Library\Library\Debug\li
文件 2 2013-11-25 11:34 Library\Library\Library\Debug\li
文件 2 2013-11-25 11:34 Library\Library\Library\Debug\li
文件 2 2013-11-25 11:34 Library\Library\Library\Debug\li
文件 2 2013-11-25 11:34 Library\Library\Library\Debug\li
文件 2 2013-11-25 11:34 Library\Library\Library\Debug\li
文件 2 2013-11-25 11:34 Library\Library\Library\Debug\li
文件 2 2013-11-25 11:34 Library\Library\Library\Debug\li
文件 2 2013-11-25 11:34 Library\Library\Library\Debug\li
文件 2 2013-11-25 11:34 Library\Library\Library\Debug\li
文件 2 2013-11-25 11:34 Library\Library\Library\Debug\li
............此处省略72个文件信息
相关资源
- PowerBuilder*图书馆管理系统*需求分析
- 数据结构年终考题范围和答案 耿国华
- 数据结构 朱战力 习题解答 数据结构
- 数据结构课程设计 6 1 彩票系统
- 教学计划编制系统
- 大数(链表、数组)实现
- 自己写的航空订票系统c 版--数据结构
- 数据结构实验魔王语言
- 航空订票系统_数据结构课程设计
- 多项式求和(数据结构C 版)
- 尚观培训linux董亮老师关于数据结构的
- 数据结构 知识点总结
- 华南理工大学数据结构复习提纲二
- 华南理工大学数据结构复习提纲一
- 数据结构用C 写的停车场系统源代码
- 数据结构(河北科技大学)
- 数据结构考前习题 清华大学出版社
- 数据结构课件(北邮)
- 数据结构实验 基于栈的表达式求值
- 数据结构课程设计——图书管理系统
- 成绩管理系统(数据结构)
- 数据结构-最小通信网问题
- 数据结构课程设计同学通讯录系统
- 数据结构课程设计 公园导游图
- 数据结构殷人昆版的课后答案
- 2006年湖北工业大学409数据结构试题
- 数据结构实验-魔王语言-源码加实验报
- 简单计算器的实现(数据结构)
- 简单计算器的实现(数据结构 修正版
- Fundamentals of Data Structure in C
评论
共有 条评论