#include<iostream>
#include<cmath>
#include<stdlib.h>
#include<string>
using namespace std;
void print0() //首页界面
{
cout<<"*****************************************"<<endl;
cout<<"* *"<<endl;
cout<<"* *"<<endl;
cout<<"* *"<<endl;
cout<<"* 请选择入口: *"<<endl;
cout<<"* [1] 客户端 *"<<endl;
cout<<"* [2] 管理员端 *"<<endl;
cout<<"* [3] 帮助 *"<<endl;
cout<<"* [4]:关于我们 *"<<endl;
cout<<"* [0] 退出系统 *"<<endl;
cout<<"* *"<<endl;
cout<<"* *"<<endl;
cout<<"*****************************************"<<endl;
}
void print1() //客户端界面
{
cout<<"*****欢迎使用悠票购票系统(客户端)********"<<endl;
cout<<"* *"<<endl;
cout<<"* *"<<endl;
cout<<"* [1]:查看在售演出信息 *"<<endl;
cout<<"* [2]:购票 *"<<endl;
cout<<"* [3]:关于我们 *"<<endl;
cout<<"* [0]:返回首页 *"<<endl;
cout<<"* *"<<endl;
cout<<"*****************************************"<<endl;
}
void print2() //管理员端界面
{
cout<<"*****欢迎使用悠票购票系统(管理员端)******"<<endl;
cout<<"* *"<<endl;
cout<<"* *"<<endl;
cout<<"* [1]:增添演出信息 *"<<endl;
cout<<"* [2]:修改演出信息 *"<<endl;
cout<<"* [3]:修改密码 *"<<endl;
cout<<"* [4]:关于我们 *"<<endl;
cout<<"* [0]:返回首页 *"<<endl;
cout<<"* *"<<endl;
cout<<"*****************************************"<<endl;
}
//公共功能
void help()
{
system("D:/help.txt");
}
void aboutme()
{
system("D:/aboutme.txt");
}
//客户端功能实现
class Message //储存剧目信息,并显示
{
public:
int Num; //剧目代码
string Title;//剧名
string Types;//剧目类型
string Date;//日期
string Place;//演出地点
int Margin;//座位余量
Message(int num,string title, string types, string date, string place, int margin) :Num(num),Title(title), Types(types), Date(date), Place(place), Margin(margin) {
}
Message() {
}
void Output()
{
cout << Num<< " " <<Title << " " << Types << " " << Date << " " << Place << " " << Margin << " "<< endl;
};
void buy(int num); //剩余票量
};
void Message::buy(int num) //剩余票量
{
Margin=Margin-num;
}
static Message m1[50] {
Message(),
Message(1,"abc","musical","2020-12-23","Beijing",1220),
Message
C++ 票务系统
最新推荐文章于 2024-05-17 18:47:36 发布