资源描述:
《C++影碟出租系统课程设计报告源代码.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
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="",int=0);video(video&vi);
2、voidinput();//private:stringVname;//碟片名称stringCountry;//国家intType;//类型stringProducer;//制片人stringDirector;//导演stringStar;//主演明星intNumber;//库存量video*next;};video::video(stringvname,stringcountry,inttype,stringproducer,stringdirector,stringstar,intnumber){Vname=vname;Country=country;Typ
3、e=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;}ostream&operator<<(ostream&os,video*vi){..os<<"**************************
4、**************************************"<Vname<<"国家:"<Country<<"类型:";if(vi->Type==1)os<<"喜剧";else{if(vi->Type==2)os<<"悲剧";else{if(vi->Type==3)os<<"科幻片";else{if(vi->Type==4)os<<"悬疑剧";else{if(vi->Type==5)os<<"惊悚片";else{if(vi->Type==6)os<<"其他
5、";}}}}}os<Producer<<"导演:"<Director<<"主演:"<Star<<"库存量:"<Number<#include#include"video.h"usingnamespacestd;//classCustomerstructVideoInfo{//碟片信息stringVideoName;//影片名称i
6、ntBeginTime;//影片借阅日期intEndTime;//影片归还日期};stringCname;classCustomer{//顾客类friendostream&operator<<(ostream&os,constCustomer&cu);friendclassapplication;friendclassvideo;public:..Customer(string="",string="",int=0,int=0,string="",int=0,int=0);//构造函数intDeclineMoney(int);//扣取消费额boolRentVid
7、eo(string);//出租影碟boolReturnVideo(string);//归还影片//private:stringidPerson;//会员账号stringName;//会员intLeftMoney;//会员剩余金额intnCount;//所借碟片数量VideoInfoVideo[10];//每个会员最多借10影碟Customer*next1;};Customer::Customer(stringidperson,stringname,intleftmoney,intncount,stringvideoname,intbegintime,intend
8、time){idPers