C++ 票务系统

#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
  • 1
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值