欢迎来到天天文库
浏览记录
ID:39713913
大小:87.50 KB
页数:20页
时间:2019-07-09
《C++影碟出租系统课程设计源代码》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、#ifndefVIDEO_H#defineVIDEO_H#include#includeusingnamespacestd;//classvideostringvidname;classvideo{//影碟类friendostream&operator<<(ostream&os,video&vi);friendclassapplication;public:video(string="",string="",int=0,string="",string="",string="",i
2、nt=0);video(video&vi);voidinput();//private:stringVname;//碟片名称stringCountry;//国家intType;//类型stringProducer;//制片人stringDirector;//导演stringStar;//主演明星intNumber;//库存量video*next;};video::video(stringvname,stringcountry,inttype,stringproducer,stringdirector,stringst
3、ar,intnumber){Vname=vname;Country=country;Type=type;Producer=producer;Director=director;Star=star;Number=number;}video::video(video&vi){Vname=vi.Vname;Country=vi.Country;Type=vi.Type;Producer=vi.Producer;Director=vi.Director;Star=vi.Star;Number=vi.Number;}ostre
4、am&operator<<(ostream&os,video*vi){....os<<"****************************************************************"<Vname<<"国家:"<Country<<"类型:";if(vi->Type==1)os<<"喜剧";else{if(vi->Type==2)os<<"悲剧";else{if(vi->Type==3)os<<
5、"科幻片";else{if(vi->Type==4)os<<"悬疑剧";else{if(vi->Type==5)os<<"惊悚片";else{if(vi->Type==6)os<<"其他";}}}}}os<Producer<<"导演:"<Director<<"主演:"<Star<<"库存量:"<Number<6、ream>#include#include"video.h"usingnamespacestd;//classCustomerstructVideoInfo{//碟片信息stringVideoName;//影片名称intBeginTime;//影片借阅日期intEndTime;//影片归还日期};stringCname;classCustomer{//顾客类friendostream&operator<<(ostream&os,constCustomer&cu);friendclassapplicat7、ion;friendclassvideo;....public:Customer(string="",string="",int=0,int=0,string="",int=0,int=0);//构造函数intDeclineMoney(int);//扣取消费额boolRentVideo(string);//出租影碟boolReturnVideo(string);//归还影片//private:stringidPerson;//会员账号stringName;//会员姓名intLeftMoney;//会员剩余金额intn8、Count;//所借碟片数量VideoInfoVideo[10];//每个会员最多借10张影碟Customer*next1;};Customer::Customer(stringidperson,stringname,intleftmoney,intncount,stringvideoname,intbegintime,intendtime){
6、ream>#include#include"video.h"usingnamespacestd;//classCustomerstructVideoInfo{//碟片信息stringVideoName;//影片名称intBeginTime;//影片借阅日期intEndTime;//影片归还日期};stringCname;classCustomer{//顾客类friendostream&operator<<(ostream&os,constCustomer&cu);friendclassapplicat
7、ion;friendclassvideo;....public:Customer(string="",string="",int=0,int=0,string="",int=0,int=0);//构造函数intDeclineMoney(int);//扣取消费额boolRentVideo(string);//出租影碟boolReturnVideo(string);//归还影片//private:stringidPerson;//会员账号stringName;//会员姓名intLeftMoney;//会员剩余金额intn
8、Count;//所借碟片数量VideoInfoVideo[10];//每个会员最多借10张影碟Customer*next1;};Customer::Customer(stringidperson,stringname,intleftmoney,intncount,stringvideoname,intbegintime,intendtime){
此文档下载收益归作者所有