C++观影网站管理系统Word格式.docx

上传人:b****6 文档编号:17197642 上传时间:2022-11-28 格式:DOCX 页数:10 大小:15.92KB
下载 相关 举报
C++观影网站管理系统Word格式.docx_第1页
第1页 / 共10页
C++观影网站管理系统Word格式.docx_第2页
第2页 / 共10页
C++观影网站管理系统Word格式.docx_第3页
第3页 / 共10页
C++观影网站管理系统Word格式.docx_第4页
第4页 / 共10页
C++观影网站管理系统Word格式.docx_第5页
第5页 / 共10页
点击查看更多>>
下载资源
资源描述

C++观影网站管理系统Word格式.docx

《C++观影网站管理系统Word格式.docx》由会员分享,可在线阅读,更多相关《C++观影网站管理系统Word格式.docx(10页珍藏版)》请在冰豆网上搜索。

C++观影网站管理系统Word格式.docx

intlevel;

intage;

stringoccupation;

stringhobby;

stringemail;

};

user:

:

user(stringname,intlevel,intage,stringoccupation,stringhobby,stringemail):

name(name),age(age),occupation(occupation),hobby(hobby),email(email){

ofstreamoutfile;

("

"

ios:

app);

outfile<

<

name<

"

level<

age<

occupation<

hobby<

email<

endl;

();

}

voiduser:

writeuser(){

cout<

enteruser'

sname:

;

cin>

name;

slevel:

level;

sage:

age;

soccupation:

occupation;

shobby:

hobby;

semail:

email;

istream&

u){

in>

returnin;

//************************************************************************************************************

//第二部分:

电影类

classmovie{

movie(){}

movie(stringname):

name(name){}

movie(stringname,intyear,stringdirect,stringrole,stringcompany,stringgrade);

~movie(){}

voidwritemoive();

stringgetmoviename(){returnname;

in,movie&

m);

friendclasscomment;

intyear;

stringdirect;

stringrole;

stringcompany;

stringgrade;

movie:

movie(stringname,intyear,stringdirect,stringrole,stringcompany,stringgrade):

name(name),year(year),direct(direct),role(role),company(company),grade(grade){

year<

direct<

role<

company<

grade<

voidmovie:

writemoive(){

pleaseentermovie'

pleaseenterthemoviereleaseyear:

year;

sdirect:

direct;

srole:

role;

pleaseenterthefilmproductioncompany:

company;

Pleaseenterthemovieclassification:

grade;

m){

//****************************************************************************************************************

//第三部分:

影评类

classcomment{

comment(moviemoviecomment);

comment(moviemoviecomment,userusercomment,doublescore,stringconnection);

~comment(){}

voidwritecomment(userrcomment);

stringusername;

stringmoviename;

doublescore;

stringconnection;

staticintcommentcount;

intcomment:

commentcount=0;

comment:

comment(moviemoviecomment){

commentcount++;

moviename=();

cout<

videolink:

cin>

connection;

comment(moviemoviecomment,userusercomment,doublescore,stringconnection):

score(score),connection(connection){

moviename=();

username=();

moviename<

username<

score<

connection<

commentcount<

voidcomment:

writecomment(userusercomment){

pleaseratethefilm:

score;

//******************************************************************************************************************************

//第四部分:

菜单系统功能函数编辑部分

voidinitialization(){

Menusystemready"

movieZootopia("

Zootopia"

2016,"

Howard"

"

Jodie"

Disney"

PG"

);

movieBegonia("

Begonia"

LiangXuan"

chun"

Enlight"

movieDoraemon("

Doraemon"

Shinosuke"

Doraemon"

Toho"

PG"

voidwritenewuser(){

youcanadduser'

sinfomation:

usernewuser;

voidreaduser(){

thisisuser'

namelevelageoccupationhobbyemail"

ifstreamin("

charp;

while(p))

(p);

voidwritenewmoive(){

movienewmovie;

voidreadmovie(){

thisismovie'

movienameyeardirectrolecompanygrade"

voidwritenewcomment(){

youcanaddmovie'

usercommentuser;

moviecommentmovie;

youcanaddcomment'

pleaseenteryourname:

commentuser;

pleaseentermoive'

commentmovie;

commentnewcomment(commentmovie);

(commentuser);

voidreadcomment(){

thisiscomment'

movienameusernamescoreconnectioncommentcount"

voidclearing(){

Menusystemclearing"

("

();

//******************************************************************************

//第五部分,菜单系统实现部分

voidmenuframe(){

*************************************************************"

*Welcometothemoviecriticinformationmanagementsystem*"

-------------------------------------------------------------"

[enter1][makemenusystemready]"

-------------------------------------------------------------"

[enter2][lookupuser'

sinfomation]"

[enter3][increaseuser'

[enter4][lookupmoive'

[enter5][increasemoive'

[enter6][lookupcomment'

sinfomaition]"

[enter7][increasecomment'

[enter8][makemenusystemclearing]"

[enter0][exitmenusystem]"

intmenuinput(){

intorder;

pleaseenterthemenuorder:

order;

returnorder;

voidmenuimplementation(intorder){

switch(order){

case0:

exit(0);

break;

case1:

initialization();

break;

case2:

readuser();

case3:

writenewuser();

break;

case4:

readmovie();

case5:

writenewmoive();

case6:

readcomment();

case7:

writenewcomment();

case8:

clearing();

default:

yourinputwrong,pleasere-entertheinstruction!

}

//第六部分:

主函数

intmain(){

menuframe();

while(true){

********************************************************************************"

intinstruct=menuinput();

menuimplementation(instruct);

return0;

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 职业教育 > 中职中专

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1