c汽车租赁管理系统内容摘要:
//归还操作 void print() { cout 汽车原编号: setw(6) no \t 汽车原名称 : setw(18) name \t setw(10) (onshelf==1? 在车库 :已租 ) endl。 } //输出汽车 void disp() { cout setw(6) no setw(18) name setw(10) (onshelf==1? 在车库 :已租 ) endl。 } //显示 void disp(int k) { cout编号为 noendl。 } }。 templateclass T class biaozhiq { public: T abaso。 }。 //汽车库类,实现对汽车的管理,查找,删除等 class CarDatabase { public: int top。 //汽车记录指针 Car che[Maxc]。 //汽车记录 CarDatabase() { Car b。 top=1。 fstream file(,ios::in)。 while (1) { ((char *)amp。 b,sizeof(b))。 if (!file) break。 top++。 che[top]=b。 } ()。 } //构造函数,将 che[]中 void clear()//全删 { top=1。 } int addcar(int n,char *na)。 //增加汽车 Car *query(int carid) { for (int i=0。 i=top。 i++) if (che[i].getno()==carid amp。 amp。 che[i].gettag()==0) { return amp。 che[i]。 } return NULL。 } //查找汽车 void cardata()。 //汽车库管理 virtual void print(int n) { for(int i=0。 i=top。 i++) if(che[i].getno()==n) che[i].print()。 } //输出原汽车 void disp() { for (int i=0。 i=top。 i++) if (che[i].gettag()==0) che[i].disp()。 } //显示 ~CarDatabase()。 //析构函数,将 che[]写到 文件中 }。 int CarDatabase::addcar(int n,char *na) { Car *p=query(n)。 if (NULL==p) { top++。 che[top].addcar(n,na)。 return 1。 } return 0。 } //增加汽车 CarDatabase::~CarDatabase() { fstream file(,ios::out)。 for (int i=0。 i=top。 i++) if (che[i].gettag()==0) ((char *)amp。 che[i],sizeof(che[i]))。 ()。 ofstream f(c:\\)。 for (int j=0。 j=top。 j++) { if(che[j].gettag()==0) f编号。 fche[j].no。 f\t\t\t。 f汽车。 fche[j].name。 f\t\t\t。 if(che[j].onshelf==1) f在车库 endl。 else f已出租 endl。 } } //析构函数,将 che[]写到 文件中 //汽车管理 void CarDatabase::cardata() { char choice。 char ame[20]。 int carid。 Car *b。 do { cout \n\n\n\t\t\t欢迎进入汽车管理界面 endlendl。 cout\t\tendl。 cout\t\t| 1 增加汽车 |endl。 cout\t\t| 2 更改汽车 |endl。 cout\t\t| 3 删除汽车 |endl。 cout\t\t| 4 查找汽车 |endl。 cout\t\t| 5 查看全部 |endl。 cout\t\t| 6 删除全部 |endl。 cout\t\t| 0 返回上一层 |endl。 cout\t\tendl。 cin choice。 switch (choice) { case 39。 139。 : cout 新增 \n 输入汽车编号 :endl。 cin carid。 try { if(carid=0)throw 1。 } catch(...) { cout输入有误,请重新 输入。 break。 } cout 输入汽车名称 :endl。 cin ame。 addcar(carid,ame)。 break。 case 39。 239。 : cout 更改 \n 输入汽车编号 :endl。 cin carid。 try { if(carid=0)throw 1。 } catch(...) { cout输入有误,请重新输入。 break。 } b=query(carid)。 if (b==NULL) { cout 该汽车不存在。 coutendl。 break。 } print(carid)。 cout 输入新的汽车编号 :。 coutendl。 cincarid。 try { if(carid=0)throw 1。 } catch(...) { cout输入有误,请重新输入。 break。 } cout 输入新的汽车名称 :endl。 cin ame。 baddcar(carid,ame)。 cout修改成功 !endl。 break。 case 39。 339。 : cout 删除 \n 读入汽车编号 :endl。 cin carid。 try { if(carid=0)throw 1。 } catch(...) { cout输入有误,请重新输入。 break。 } b=quer。c汽车租赁管理系统
相关推荐
捷,不用重载 if(i==0) head=p1。 p2=new Zhuhu。 if(i==count1) p1next=NULL。 else {p1next=p2。 p1=p2。 }。 } ()。 //关闭文件,防止误操作 Zhuhu *jianli(Zhuhu *head)。 //建立数据库函数声明 void shuchu(Zhuhu *head)。 Zhuhu *charu(Zhuhu
................................................................ 42 国家投资产业环境 ............................................................................. 42 产业和产业政策 .................................
确定为一级红色。 红色系统自动提醒、报警,短信发送至相关人员手机。 市级管理员报请有关领导审核后,可以发布预警通报。 提供分析的字段是: ( 1) 矛盾纠纷类型 ( 2) 发生时间 ( 3) 参与人数 ( 4) 纠纷等级 ( 5) 纠纷占比 对当前或一段时间矛盾纠纷居高不下的,分析原因、形成分析报告、落实具体措施。 对在规定期限内未能 调处结案的矛盾纠纷,系统自动提 22 醒、报警
()。 coutThe items of y is:endl。 ()。 coutendl。 coutThe result of x+y is:endl。 result=x+y。 ()。 coutendl。 coutThe result of x*y is:endl。 result=x*y。 ()。 coutendl。 更多资料下载尽在我的主页 coutEnter the item you
捏的材料和对象,而不是学者应该虚心倾听和尊重的智慧源泉与生活方式。 技术层面的操作能否成功,首先需要我们在伦理层面的清醒。 吕微 宗迪痛斥科学,爱东赞誉科学,二人讲的科学是不是一个层面的东西。 爱东说了,不是一个层面的,我讲的科学是技术层面的,你讲的科学是伦理层面的,井水不犯河水。 宗迪似乎也承认有“次要的”和“根本的”层次区别。 但他认为,爱东的论文既可 以从技术层面加以批评
cout 电子技术成绩 :。 cinstud[i].elec。 if(stud[i].elec100 ||stud[i].elec1) cout对不起 ,请输入 1100之间的数字 !!\n。 else flag=1。 }while(flag==0)。 do{ flag=0。 cout C++程序设计成绩 :。 cinstud[i].c_program。 if(stud[i]