


版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、#include #include #include using namespace std;/ 第一部分:用户类class userpublic:user() user(string name):name(name) user(string name,int level,int age,string occupation,string hobby,string email); string getusername()return name; void writeuser();friend istream &operator(istream &in,user &u);private:strin
2、g name;int level;int age;string occupation;string hobby;string email;user:user(string name,int level,int age,string occupation,string hobby,string email):name(name),age(age),occupation(occupation),hobby(hobby),email(email) ofstream outfile;(,ios:app);outfilename level age occupation hobby emailendl;
3、();void user:writeuser()ofstream outfile;(,ios:app);coutname;coutlevel;coutage;coutoccupation;couthobby;coutemail;coutendl;outfilename level age occupation hobby email(istream &in,user &u)in;return in;/*/ 第二部分:电影类class moviepublic:movie()movie(string name):name(name)movie(string name,int year, strin
4、g direct,string role,string company,string grade); movie() void writemoive();string getmoviename()return name;friend istream &operator(istream &in,movie &m);friend class comment;private:string name;int year;string direct;string role;string company;string grade;movie:movie(string name,int year, strin
5、g direct,string role,string company,string grade):name(name),year(year),direct(direct),role(role),company(company),grade(grade) ofstream outfile;(,ios:app);outfilename year direct role company gradeendl;();void movie:writemoive() ofstream outfile; (,ios:app);coutname;coutyear;coutdirect;coutrole;cou
6、tcompany;coutgrade;coutendl;outfilename year direct role company grade(istream &in,movie &m)in;return in; /*/ 第三部分:影评类 class commentpublic:comment(movie moviecomment);comment(movie moviecomment,user usercomment,double score,string connection); comment() void writecomment(user rcomment);private:strin
7、g username;string moviename;double score;string connection;static int commentcount;int comment:commentcount=0; comment:comment(movie moviecomment) commentcount+; moviename=();coutconnection; comment:comment(movie moviecomment,user usercomment,double score,string connection):score(score),connection(c
8、onnection)commentcount+;moviename=();username=();ofstream outfile;(,ios:app);outfilemoviename username score connection commentcountendl;();void comment:writecomment(user usercomment)username=();ofstream outfile;(,ios:app);coutscore;outfilemoviename username score connection commentcountendl;();/*/
9、第四部分:菜单系统功能函数编辑部分void initialization()coutMenu system readyendl;movie Zootopia(Zootopia ,2016, Howard ,Jodie ,Disney ,PG);movie Begonia (Begonia ,2016, LiangXuan,chun ,Enlight,PG);movie Doraemon(Doraemon ,2016, Shinosuke,Doraemon,Toho , PG); void writenewuser()coutyou can add users infomation:endl;c
10、outendl;user newuser;();void readuser()coutthis is users infomation:endl;coutendl;coutname level age occupation hobby emailendl;ifstream in();char p;while(p)(p);void writenewmoive()movie newmovie;();void readmovie()coutthis is movies infomation:endl;coutendl;coutmoviename year direct role company gr
11、adeendl;ifstream in();char p;while(p)(p);void writenewcomment()coutyou can add movies infomation:endl;user commentuser;movie commentmovie;coutyou can add comments infomation:endl;coutcommentuser;coutcommentmovie;comment newcomment(commentmovie);(commentuser);void readcomment()coutthis is comments in
12、fomation:endl;coutmoviename username score connection commentcountendl;ifstream in();char p;while(p)(p);void clearing()coutMenu system clearingendl;ofstream outfile;();();();();();();/ 第五部分,菜单系统实现部分 void menuframe()cout*、endl;cout* Welcome to the movie critic information management system *endl;cout
13、*、endl;endl;endl;endl;coutendl;coutendl;cout enter 1 make menu system ready cout endl;cout enter 2 look up users infomation coutendl;cout enter 3 increase users infomationcoutendl;endl;endl;endl;endl;endl;endl;cout enter 4 look up moives infomation coutendl;cout enter 5 increase moives infomation co
14、utendl;cout enter 6 look up comments infomaition coutendl;cout enter 7 increase comments infomation coutendl;cout enter 8 make menu system clearing coutendl;cout enter 0 exit menu system coutendl;coutendl; coutendl;int menuinput()int order;coutorder;coutendl;return order;void menuimplementation(int order)switch(order)case 0:exit(0);break;case 1:initialization();break;case 2:readuser();break;case 3:writenewuser();break;case 4:readmovie();break;case 5:writenewmoive();break;case 6:readcomment();break;case 7:cout*endl;writenewcomment(); break;case 8:
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 江西工程学院《仪器机械学基础》2023-2024学年第二学期期末试卷
- 长春医学高等专科学校《建筑信息建模技术与管理》2023-2024学年第二学期期末试卷
- 天津理工大学中环信息学院《火电厂烟气净化Ⅱ》2023-2024学年第二学期期末试卷
- 河北轨道运输职业技术学院《野生动植物保护与管理》2023-2024学年第二学期期末试卷
- 西安高新科技职业学院《公共关系学》2023-2024学年第二学期期末试卷
- 大理护理职业学院《植物资源化学》2023-2024学年第二学期期末试卷
- 2024年核磁共振岩心测试仪投资申请报告代可行性研究报告
- 2024年高性能铁氧体一次磁粉项目投资申请报告代可行性研究报告
- 安全教育说课稿
- 2025年四川泸州自贸区龙驰商务秘书服务有限公司招聘笔试参考题库含答案解析
- 草皮铺种施工方案
- 中医养生穴位保健按摩课件
- 肩关节镜下肩袖修补术的护理查房ppt
- 回旋镖运动轨迹的模拟
- 《康复医学》PPT课件(PPT 105页)
- (完整)高血压病历以及全套临床病历
- 标准溶液配制与标定原始记录(氢氧化钠)
- 光学零件工艺学
- 内墙腻子施工技术交底
- 自粘聚合物改性沥青防水卷材施工方案5完整
- 浙工大 《大学英语》专升本 复习试卷 及答案
评论
0/150
提交评论