资源描述:
《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&
2、vi);voidinput();//private:stringVname;//碟片名称stringCountry;//国家intType;//类型stringProducer;//制片人stringDirector;//导演stringStar;//主演明星intNumber;//库存量video*next;};video::video(stringvname,stringcountry,inttype,stringproducer,stringdirector,stringstar,intnumber){Vname=vname;Country=cou
3、ntry;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;}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-
5、>Type==6)os<<"其他";}}}}}os<Producer<<"导演:"<Director<<"主演:"<Star<<"库存量:"<Number<#include#include"video.h"usingnamespacestd;//classCustomerstructVideoInfo{//碟片信息str
6、ingVideoName;//影片名称intBeginTime;//影片借阅日期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
7、(int);//扣取消费额boolRentVideo(string);//出租影碟boolReturnVideo(string);//归还影片//private:stringidPerson;//会员账号stringName;//会员姓名intLeftMoney;//会员剩余金额intnCount;//所借碟片数量VideoInfoVideo[10];//每个会员最多借10张影碟Customer*next1;};Customer::Customer(stringidperson,stringname,intleftmoney,intncount,stri
8、ngvideoname,intbegintime,intendtime){idP