《软件开发与创新课程设计》第一次作业
一、项目名称与来源:
软件开发与创新课程设计第一次作业,题目为图书管理系统,代码在CSND上找的。
二、项目目的:
对于原代码添加新功能。
三、原代码:
#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#include <algorithm>
#include <fstream>
#include <cctype>
#include <iomanip>
#include <conio.h>
using namespace std;
struct student
{
int id;//读者编号
string name;//读者姓名
int borrowsum;//你已借阅多少本书,默认为0
int number;//现在还有多少本书未还,默认为0
string borrowday;//上次借阅时间,默认为0000.00.00
int b[10];//你所借书的的编号,最多10本
};
struct book
{
int idnum;//图书检索号
int BorrowCount;//图书借阅量,初始化为0
string name;//书名
string kind;//图书种类
double price;//图书价格
int sum;//图书总库存存量
int nowsum;//图书现库存量
string author;//图书作者
int appointment;//图书预约量,初始化为0
bool ok;//是否可借,初始为可以
string borrowdate;//图书最近一次借出时间,默认为0000-00-00;
string returndate;//图书最近一次归还时间,默认为0000-00-00;
string room;//馆藏地
};
bool cmpByidnum(book a,book b)
{
return a.idnum<b.idnum;
}
bool cmpByCount(book a,book b)
{
return a.BorrowCount>b.BorrowCount;
}
bool cmpByBorrowsum(student a,student b)
{
return
