C++影碟出租系统课程设计源代码.doc

上传人:灯火****19 文档编号:136792385 上传时间:2020-07-02 格式:DOC 页数:20 大小:58.50KB
返回 下载 相关 举报
C++影碟出租系统课程设计源代码.doc_第1页
第1页 / 共20页
C++影碟出租系统课程设计源代码.doc_第2页
第2页 / 共20页
C++影碟出租系统课程设计源代码.doc_第3页
第3页 / 共20页
C++影碟出租系统课程设计源代码.doc_第4页
第4页 / 共20页
C++影碟出租系统课程设计源代码.doc_第5页
第5页 / 共20页
点击查看更多>>
资源描述

《C++影碟出租系统课程设计源代码.doc》由会员分享,可在线阅读,更多相关《C++影碟出租系统课程设计源代码.doc(20页珍藏版)》请在金锄头文库上搜索。

1、#ifndef VIDEO_H#define VIDEO_H#include#includeusing namespace std;/class videostring vidname;class video /影碟类 friend ostream &operator(ostream &os,video &vi);friend class application;public:video(string=,string=,int=0,string=,string=,string=,int=0);video(video &vi);void input();/private:string Vname

2、; /碟片名称string Country; /国家int Type; /类型string Producer; /制片人string Director; /导演string Star; /主演明星int Number; /库存量video *next;video:video(string vname,string country,int type,string producer,string director,string star,int number)Vname=vname;Country=country;Type=type;Producer=producer;Director=direc

3、tor;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*endl;os该影碟信息为:endl;os名称:Vname国家:CountryType=1)osType=2)osType=3)osType=4)osType=5)osType

4、=6)os其他;osendl;os制片人:Producer导演:Director主演:Star库存量:Numberendl;return os;#endif#ifndef CUSTOMER_H#define CUSTOMER_H#include#include#includevideo.husing namespace std;/class Customerstruct VideoInfo/碟片信息string VideoName;/影片名称int BeginTime;/影片借阅日期int EndTime;/影片归还日期;string Cname;class Customer /顾客类frie

5、nd ostream & operator (ostream &os,const Customer &cu);friend class application;friend class video;public:Customer(string=,string=,int=0,int=0,string=,int=0,int=0); /构造函数int DeclineMoney(int );/扣取消费额bool RentVideo(string );/出租影碟bool ReturnVideo(string );/归还影片/private:string idPerson; /会员账号string Nam

6、e;/会员姓名int LeftMoney;/会员剩余金额int nCount;/所借碟片数量VideoInfo Video10;/每个会员最多借10张影碟Customer *next1;Customer:Customer(string idperson,string name,int leftmoney,int ncount,string videoname,int begintime,int endtime)idPerson=idperson;Name=name;LeftMoney=leftmoney;nCount=ncount;for(int i=0;inCount;i+)Videoi.V

7、ideoName=videoname;Videoi.BeginTime=begintime;Videoi.EndTime=endtime;ostream & operator (ostream &os,const Customer *cu)os会员编号为:tidPerson会员姓名为:tName会员剩余会费余额为:tLeftMoneyendl;for (int i=0;inCount;i+)os所借影片名为:tVideoi.VideoNameendl;os影片借阅日期为:tVideoi.BeginTimeendl;os影片归还日期为:tVideoi.EndTimeendl;os-n;retur

8、n os;#endif#ifndef MENU_H#define MENU_H#includeusing namespace std;/class menuclass menu /菜单类public:int showMainMenu();private:;int menu:showMainMenu()system(cls);cout endl;cout| 欢迎使用影碟出租系统 |endl;cout|*|endl;cout| 1.影碟租赁 |endl;cout| 2.影碟归还 |endl;cout| 3.查看各类型影碟信息 |endl;cout| 4.查询碟片信息 |endl;cout| 5.添

9、加新影碟 |endl; cout| 6.删除碟片信息 |endl; cout| 7.修改碟片信息 |endl;cout| 8.查看会员信息 |endl;cout| 9.注册会员 |endl; cout| 10.注销会员 |endl;cout| 11.更新会员信息与充值 |endl;cout| 12.退出系统 |endl;cout endl;cout请选择1-12:select;while(select12)cout选择错误,请重新选择1-12select;return select;#endif#ifndef APPLICATION_H#define APPLICATION_H#include#include#include#includevideo.h#includeCustomer.h#includemenu.husing namespace std;class application /数据应用类public:application();application();void load(); /数据输出void save(); /数据保存到文件void Rent(); /1.影碟租赁void Return(); /2.影碟归

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 大杂烩/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号