You are on page 1of 47

2012/2013 20

*** ***

1
2011329620***
***

1
2 1
3 C++
4

10 10
8:00 2 2

160
270
380
490

1
21

10-306

10-306

1
22

10-306

10-306

1
23

10-306

10-306

10-306

10-306

10-306

10-306

1
24

1
25

1
2
3
4
5
6
7

1
2 1
3 C++
4

10 10
8:00 2 2

CFY1101
txt
MovieInfo.txt
4

1 2
inputshow
searchchange)delbookrefund
bookrefund

customer

manager

CFY1101

read() MovieInfo.txt

vector


vector erase()
save() vector MovieInfo.txtMovieInfo.txt

MovieInfo.txt customer vector


P User vector Q

P Q Q
P Q
P Q

4
Ticket
class Ticket
{
protected:
char MovieName[20];
double price;
double discount;
int num;
int year;

int month;
int day;
int hour;
int minute;
int rest;
bool map[10][10];
};
Ticket Manager Custom
User
class User
{
char name[20];
int year;
int month;
int day;
int hour;
int minute;
int n;
int Seat[10][10];
};
User Custom
Manager
class Manager :public Ticket
{
vector<Ticket> P;
vector<Ticket>:: iterator pos;
static string UserName;
static string Password;
public:
void input();
void show();
void search();
void change();
void del();
void read();
void save();
string getUserName(){return UserName;}
string getPassword(){return Password;}
bool cmp(Ticket a,Ticket b);
};
Manager Ticket Ticket Ticket

Custom
class Customer :public Ticket
{
vector<Ticket> P;
vector<User> Q;
vector<Ticket>:: iterator pos;
vector<User>:: iterator pos1;
public:
void book(char IDName[]);
void refund(char IDName[]);
};
Custom Ticket Ticket vector P pos
User vector Q pos1 bookchar [ ] defundchar [];

Interface
class Interface
{
public:
void display();
void IntroduceFace();
void ManagerFace();
void CustomerFace();
};
Interface display()IntroduceFace();
ManagerFace();CustomerFace();

Menu
class Menu
{
public:
void manager(Interface cfy);
void customer(Interface cfy,char IDName[] );
};
manager(Interface cfy)
customer(Interface cfy,char IDName[] )
8


UserInfo
class UserInfo
{
char IDName[30];
char password[7];
public:
UserInfo();
void Login();
void Register();
};

1
//
void UserInfo::Register()
{
char id[30];
while(1)
{
9

cout<<":\n";
gets(IDName);
cout<<"6 \n";
gets(password);
if(strcmp(IDName,"CFY")==0) //
{
cout<<"CFY "<<endl;
continue;
}
strcpy(id,IDName);
strcat(IDName,".txt");
ifstream iFile(IDName,ios::in);
if(!iFile){
ofstream oFile(IDName,ios::out|ios::app);
oFile.write((char *) &password,sizeof(password));
oFile.close();
cout<<id<<""<<endl<<endl;
for(int i=1;i<=3;i++)
{
cout<<i<<""<<endl;
Sleep(1000);
}
system("cls");
Menu com;
Interface cfy;
com.customer(cfy,IDName);
break;
}
else{
cout<<""<<endl;
iFile.close();
}
}
}
2
//
void UserInfo::Login()
{
char pw[7];
char id[30];
Menu com;
Interface cfy;
cout<<"\n";
gets(IDName);
10

cout<<"\n";
gets(password);
strcpy(id,IDName);
strcat(IDName,".txt");
ifstream iFile(IDName,ios::in);
if(!iFile)
{
if(strcmp(IDName,"CFY.txt")==0&&strcmp(password,"1101")==0)
{
cout<<" CFY"<<endl;
for(int i=1;i<=3;i++)
{
cout<<i<<""<<endl;
Sleep(1000);
}
com.manager(cfy);
}
else
{
cout<<id<<" "<<endl
<<" "<<"\n\n\n
"<<endl;
getchar();
system("cls");
cfy.display();
}
}
else
{
iFile.read((char *) &pw,sizeof(pw));
if(strcmp(pw,password)==0)
{
cout<<""<<id<<","<<endl;
for(int i=1;i<=3;i++)
{
cout<<i<<""<<endl;
Sleep(1000);
}
com.customer(cfy,IDName);
}
else
{
cout<<""<<endl
<<""<<"\n\n\n "<<endl;
11

getchar();
system("cls");
cfy.display();
}
}
}
3
//
void Menu::manager(Interface cfy)
{
system("cls");
Manager boss;
boss.read();
int choice2;
cfy.ManagerFace();
cin>>choice2;
do
{
switch(choice2)
{
case 1:
boss.input();
break;
case 2:
boss.show();
break;
case 3:
boss.search();
break;
case 4:
boss.change();
break;
case 5:
boss.del();
break;
case 6:
default:
boss.save();
system("pause");
system("cls");
cfy.display();
return;
}
12

getchar();
getchar();
system("cls");
cfy.ManagerFace();
cin>>choice2;
}
while(1);
}
4
//
void Manager::read()
{
ifstream iFile("MovieInfo.txt",ios::in);
/*if(!iFile)
cout<<""<<endl;*/
Ticket s;
iFile.read((char *)&s,sizeof(Ticket));
while(!iFile.eof())
{
P.push_back(s);
iFile.read((char *)&s,sizeof(Ticket));
}
iFile.close();
}
5
//
void Manager::input()
{
system("cls");
cout<<"\n\n\n\t\t\t\t\n\n\n"<<endl;
Ticket Movie;
char ch;
while(1)
{
int date[5],n;
char na[20];
double y1,y2;
cout<<"\n (2013-01-21)";
cin>>date[0]>>ch>>date[1]>>ch>>date[2];
Movie.setYear(date[0]);
Movie.setMonth(date[1]);
Movie.setDay(date[2]);
13

cout<<"\n (12:30)";
cin>>date[3]>>ch>>date[4];
Movie.setHour(date[3]);
Movie.setMinute(date[4]);
cout<<"\n ";
cin>>n;
Movie.setNum(n);
cout<<"\n ";
cin>>na;
Movie.setMovieName(na);
cout<<"\n ";
cin>>y1;
Movie.setPrice(y1);
cout<<"\n ";
cin>>y2;
Movie.setDiscount(y2);
//Movie.setMap();
//Movie.setRest(100);
P.push_back(Movie);
cout<<"\n y/n";
cin>>ch;
if(ch=='y')
continue;
if(ch=='n')
break;
}
}
6
//
int Ticket::timecmp(int a[],int b[],int n)
{
int i;
for(i=0;i<n;i++)
{
if(a[i]>b[i])
return 1;
if(a[i]<b[i])
return -1;
}
if(i==n)
return 0;
}

14

void Manager::show()
{
system("cls");
cout<<"\n\n\n\t\t\t\t\n\n\n"<<endl;
cout<<"
"<<endl;
cout<<"_______________________________________________________________
________________"<<endl;
cout<<"----\t -\t \t \t \t \t "<<endl<<endl;
time_t t;
struct tm *tim;
t=time(NULL);//
tim=localtime(&t);
int
array[5]={tim->tm_year+1900,tim->tm_mon+1,tim->tm_mday,tim>tm_hour,tim->tm_min};
pos=P.begin();
for(pos=P.begin();pos!=P.end();pos++)
{
int datatime[5];
datatime[0]=pos->getYear();
datatime[1]=pos->getMonth();
datatime[2]=pos->getDay();
datatime[3]=pos->getHour();
datatime[4]=pos->getMinute();
int r=timecmp(datatime,array,5);
cout<<pos->getYear()<<"-"<<pos->getMonth()<<"-"<<pos>getDay()<<"\t";
cout<<pos->getHour()<<":"<<pos->getMinute()<<"\t";
cout<<pos->getNum()<<"\t"<<pos->getMovieName()<<"\t\t";
cout<<pos->getPrice()<<"\t"<<pos->getDiscount()<<"\t"<<pos>getRest();
if(r<=0)
cout<<"\a" <<endl;
else
cout<<endl;
}
}
7
//
void Manager::search()
{
system("cls");
cout<<"\n\n\n\t\t\t\t\n\n\n"<<endl;
15

time_t t;
struct tm *tim;
t=time(NULL);//
tim=localtime(&t);
int
array[5]={tim->tm_year+1900,tim->tm_mon+1,tim->tm_mday,tim>tm_hour,tim->tm_min};
int choice;
int ok=0;
do
{
cout<<endl<<"\t\t\t\t1.";
cout<<endl<<"\t\t\t\t2.";
cout<<endl<<"\t\t\t\t ";
cin>>choice;
if(choice!=1&&choice!=2)
cout<<"\n\a\t\t\t\t "<<endl;
}while(choice!=1&&choice!=2);
if(choice==1)
{
char na[20];
cout<<"\n";
cin>>na;
for(pos=P.begin();pos!=P.end();pos++)
{
if(strcmp(pos->getMovieName(),na)==0)
{
int datatime[5];
datatime[0]=pos->getYear();
datatime[1]=pos->getMonth();
datatime[2]=pos->getDay();
datatime[3]=pos->getHour();
datatime[4]=pos->getMinute();
int r=timecmp(datatime,array,5);
cout<<"\n
"<<endl;

cout<<"_______________________________________________________________
________________"<<endl;
cout<<" ---- \t - \t \t \t \t \t
"<<endl<<endl;
cout<<pos->getYear()<<"-"<<pos->getMonth()<<"-"<<pos>getDay()<<"\t";
cout<<pos->getHour()<<":"<<pos->getMinute()<<"\t";
cout<<pos->getNum()<<"\t"<<pos->getMovieName()<<"\t\t";
16

cout<<pos->getPrice()<<"\t"<<pos>getDiscount()<<"\t"<<pos->getRest();
if(r<=0)
cout<<"\a" <<endl;
else
cout<<endl;
cout<<"\t\t\t\t \n";
for(int i=0;i<10;i++)
{
for(int j=0;j<10;j++)
{
if(pos->getMap(i,j)==0)
cout<<"[] ";
else
cout<<"[] ";
}
cout<<endl;
}
ok=1;
}
}
if(!ok)
cout<<""<<endl;
}
else if(choice==2)
{
int date[3];
int temp[3];
char ch;
cout<<"--"<<endl;
cin>>date[0]>>ch>>date[1]>>ch>>date[2];
for(pos=P.begin();pos!=P.end();pos++)
{
temp[0]=pos->getYear();
temp[1]=pos->getMonth();
temp[2]=pos->getDay();
if(timecmp(temp,date,3)==0)
{
int datatime[5];
datatime[0]=pos->getYear();
datatime[1]=pos->getMonth();
datatime[2]=pos->getDay();
datatime[3]=pos->getHour();
datatime[4]=pos->getMinute();
17

int r=timecmp(datatime,array,5);
cout<<"\n

"<<endl;

cout<<"_______________________________________________________________
________________"<<endl;
cout<<" ---- \t - \t \t \t \t \t
"<<endl<<endl;
cout<<pos->getYear()<<"-"<<pos->getMonth()<<"-"<<pos>getDay()<<"\t";
cout<<pos->getHour()<<":"<<pos->getMinute()<<"\t";
cout<<pos->getNum()<<"\t"<<pos->getMovieName()<<"\t\t";
cout<<pos->getPrice()<<"\t"<<pos>getDiscount()<<"\t"<<pos->getRest();
if(r<=0)
cout<<"\a" <<endl;
else
cout<<endl;
cout<<"\t\t\t\t \n";
for(int i=0;i<10;i++)
{
for(int j=0;j<10;j++)
{
if(pos->getMap(i,j)==0)
cout<<"[] ";
else
cout<<"[] ";
}
cout<<endl;
}
ok=1;
}
}
if(!ok)
cout<<""<<endl;
}
}
8
//
void Manager::del()
{
system("cls");
18

cout<<"\n\n\n\t\t\t\t\n\n\n"<<endl;
char na[20];
cout<<"\n ";
cin>>na;
pos=P.begin();
int ok=0;
for(pos=P.begin();pos!=P.end();pos++)
{
if(strcmp(pos->getMovieName(),na)==0)
{
P.erase(pos);
cout<<endl<<"\t\t\t\t \n";
ok=1;
}
}
if(!ok)
{
cout<<"\n\a\t\t\t\t \n"<<endl;
system("pause");//
return;
}
}
9
//
void Manager::save()
{
ofstream oFile("MovieInfo.txt",ios::out|ios::app);
if(!oFile)
{
cout<<"Can not open the file!"<<endl;
return ;
}
for(int i=0;i<P.size();i++)
oFile.write((char *) &P[i],sizeof(Ticket));
oFile.close();
P.clear();
}
10
//
void Menu::customer(Interface cfy,char IDName[])
{
system("cls");
19

cfy.CustomerFace();
Customer ct;
int choice2;
do{
cin>>choice2;
switch (choice2)
{
case 1:
ct.book(IDName);
break;
case 2:
ct.refund(IDName);
break;
case 3:
default:
system("pause");
system("cls");
cfy.display();
return ;
}
getchar();
getchar();
system("cls");
cfy.CustomerFace();
}
while(1);
}

11
//
void Customer::book(char IDName[])
{
system("cls");
cout<<"\n\n\n\t\t\t\t\n\n\n"<<endl;
ifstream iFile1(IDName,ios::in);
if(!iFile1)
{
cout<<""<<endl;
return ;
}
char s1[7];
iFile1.read((char *) &s1,sizeof(s1));
User a;
20

iFile1.read((char *)&a,sizeof(User));
while(!iFile1.eof())
{
Q.push_back(a);
iFile1.read((char *)&a,sizeof(User));
}
iFile1.close();
ifstream iFile("MovieInfo.txt",ios::in);
if(!iFile)
{
cout<<""<<endl;
return ;
}
Ticket s;
iFile.read((char *)&s,sizeof(Ticket));
while(!iFile.eof())
{
P.push_back(s);
iFile.read((char *)&s,sizeof(Ticket));
}
iFile.close();
cout<<"
"<<endl;
cout<<"_______________________________________________________________
________________"<<endl;
cout<<"----\t -\t \t \t \t \t "<<endl<<endl;
time_t t;
struct tm *tim;
t=time(NULL);//
tim=localtime(&t);
int
array[5]={tim->tm_year+1900,tim->tm_mon+1,tim->tm_mday,tim>tm_hour,tim->tm_min};
pos=P.begin();
int ok=0;
int flag=0;
for(pos=P.begin();pos!=P.end();pos++)
{
int datatime[5];
datatime[0]=pos->getYear();
datatime[1]=pos->getMonth();
datatime[2]=pos->getDay();
datatime[3]=pos->getHour();
datatime[4]=pos->getMinute();
int r=timecmp(datatime,array,5);
21

if(r>0)
{
cout<<pos->getYear()<<"-"<<pos->getMonth()<<"-"<<pos>getDay()<<"\t";
cout<<pos->getHour()<<":"<<pos->getMinute()<<"\t";
cout<<pos->getNum()<<"\t"<<pos->getMovieName()<<"\t\t";
cout<<pos->getPrice()<<"\t"<<pos->getDiscount()<<"\t"<<pos>getRest()<<endl;
ok=1;
}
}
if(!ok)
{
cout<<"!"<<endl;
return ;
}
char na[20];
char tt;
int mm,dd,hh,ff;
int n;
User info;
cout<<"\n (01-21 1530)";
cin>>na;
cin>>mm>>tt>>dd>>hh>>tt>>ff;
while(1)
{
for(pos=P.begin();pos!=P.end();pos++)
{
if(strcmp(pos->getMovieName(),na)==0)
{
if(pos->getDay()==dd&&pos->getMonth()==mm&&pos>getHour()==hh&&pos->getMinute()==ff)
{
cout<<""<<endl;
for(int i=0;i<10;i++)
{
for(int j=0;j<10;j++)
{
if(pos->getMap(i,j)==0)
cout<<"[] ";
else
cout<<"[] ";
}
cout<<endl;
22

}
flag=1;
break;
}
}
}
if(flag)
{
info.setName(pos->getMovieName());
info.setYear(pos->getYear());
info.setMonth(pos->getMonth());
info.setDay(pos->getDay());
info.setHour(pos->getHour());
info.setMinute(pos->getMinute());
break;
}
if(!flag)
{
cout<<""<<endl;
cout<<"y/n";
char cc;
cin>>cc;
if(cc=='y')
{
cout<<"\n (01-21 1530)";
cin>>na;
cin>>mm>>tt>>dd>>hh>>tt>>ff;
}
else if(cc=='n')
break;
}
}
cout<<"\n :";
cin>>n;
info.setN(n);
cout<<"\n ?y/n";
char th;
cin>>th;
double MaxMoney=0;
int seat[201];
int k=1;
while(1)
{
23

for(int i=1;i<=n;i++)
{
cout<<"\n i j :";
int x,y;
cin>>x>>y;
if(pos->getMap(x-1,y-1))
{
cout<<"
"<<endl;
i--;
continue;
}
pos->setMap1(x-1,y-1);
info.setSeat(x-1,y-1);
pos->setRest(1);
seat[k++]=x;
seat[k++]=y;
if(th=='y')
MaxMoney+=pos->getPrice()*pos->getDiscount();
else
MaxMoney+=pos->getPrice();
}
cout<<"\n (y/n):";
char ah;
cin>>ah;
if(ah=='y')
continue;
else
break;
}
cout<<endl<<"\t\t\t\t "<<MaxMoney<<""<<endl;
cout<<endl<<"\t\t\t\t "<<endl;
for(int i=1;i<=2*n-1;i+=2)
cout<<""<<seat[i]<<""<<""<<seat[i+1]<<""<<endl;
cout<<endl<<"\t\t\t\t ";
cout<<endl<<"\t\t\t\t ";
int flag1=0;
for(pos1=Q.begin();pos1!=Q.end();pos1++)
{
if(strcmp(pos1->getName(),info.getName())==0)
{
int date[5];
date[0]=pos1->getYear();
date[1]=pos1->getMonth();
24

date[2]=pos1->getDay();
date[3]=pos1->getHour();
date[4]=pos1->getMinute();
int date1[5];
date1[0]=info.getYear();
date1[1]=info.getMonth();
date1[2]=info.getDay();
date1[3]=info.getHour();
date1[4]=info.getMinute();
int R=timecmp(date,date1,5);
if(R==0)
{
for(int i=1;i<=2*n-1;i+=2)
pos1->setSeat(seat[k],seat[k+1]);
pos1->setN(n);
flag1=1;
break;
}
}
}
if(!flag1)
Q.push_back(info);
ofstream oFile1(IDName,ios::trunc|ios::out);//
oFile1.write((char *) &s1,sizeof(s1));
for(int i=0;i<Q.size();i++)
oFile1.write((char *) &Q[i],sizeof(User));
oFile1.clear();
Q.clear();
ofstream oFile("MovieInfo.txt",ios::trunc|ios::out);//
if(!oFile)
{
cout<<"Can not open the file!"<<endl;
return ;
}
for(int i=0;i<P.size();i++)
oFile.write((char *) &P[i],sizeof(Ticket));
oFile.close();
P.clear();
}
13
//
void Customer::refund(char IDName[])
25

{
system("cls");
cout<<"\n\n\n\t\t\t\t\n\n\n"<<endl;
time_t t;
struct tm *tim;
t=time(NULL);//
tim=localtime(&t);
int
array[5]={tim->tm_year+1900,tim->tm_mon+1,tim->tm_mday,tim>tm_hour,tim->tm_min};
char na[20];
ifstream iFile("MovieInfo.txt",ios::in);
Ticket s;
iFile.read((char *)&s,sizeof(Ticket));
while(!iFile.eof())
{
P.push_back(s);
iFile.read((char *)&s,sizeof(Ticket));
}
iFile.close();
ifstream iFile1(IDName,ios::in);
char s1[7];
iFile1.read((char *)&s1,sizeof(s1));
User a;
iFile1.read((char *)&a,sizeof(User));
while(!iFile1.eof())
{
Q.push_back(a);
iFile1.read((char *)&a,sizeof(User));
}
iFile1.close();
int seat[201];
cout<<"
"<<endl;
cout<<"_______________________________________________________________
________________"<<endl;
cout<<"----\t -\t \t \t "<<endl<<endl;
for(pos1=Q.begin();pos1!=Q.end();pos1++)
{
int k=1;
for(int i=0;i<10;i++)
for(int j=0;j<10;j++)
{
if(pos1->getSeat(i,j))
{
26

seat[k++]=i+1;
seat[k++]=j+1;
}
}
cout<<pos1->getYear()<<"-"<<pos1->getMonth()<<"-"<<pos1>getDay()<<"\t";
cout<<pos1->getHour()<<":"<<pos1->getMinute()<<"\t";
cout<<pos1->getName()<<"\t\t";
cout<<pos1->getN()<<"\t";
for(int i=1;i<=k-1;i+=2)
{
cout<<"("<<seat[i]<<","<<seat[i+1]<<")"<<endl;
cout<<"\t\t\t\t\t\t";
}
cout<<endl;
}
int ti[4];
char tt;
cout<<"(01-21 1530):"<<endl;
cin>>na;
cin>>ti[0]>>tt>>ti[1]>>ti[2]>>tt>>ti[3];
double money=0;
int ok=0,ok1=0,ok2=0,ok3=0;
for(pos1=Q.begin();pos1!=Q.end();pos1++)
{
if(strcmp(pos1->getName(),na)==0)
{
ok=1;
int datatime[4];
datatime[0]=pos1->getMonth();
datatime[1]=pos1->getDay();
datatime[2]=pos1->getHour();
datatime[3]=pos1->getMinute();
if(timecmp(datatime,ti,4)==0&&timecmp(datatime,array+1,4)>0)
{
ok1=1;
for(pos=P.begin();pos!=P.end();pos++)
{
if(strcmp(pos->getMovieName(),na)==0)
{
ok2=1;
int n;
int x,y;
cout<<""<<endl;
27

cin>>n;
cout<<""<<endl;
for(int i=0;i<n;i++)
{
cin>>x>>y;
if(pos1->getSeat(x-1,y-1)==1)
{
if(pos->getMap(x-1,y-1)==1)
{
ok3=1;
pos->setMap0(x-1,y-1);
pos->setRest(-1);
money+=pos->getPrice();
cout<<" "<<x<<" "<<" "<<x<<"
"<<endl;
pos1->setSeat0(x-1,y-1);
pos1->setN0(1);
}
}
else
cout<<" "<<x<<" "<<" "<<x<<"
"<<endl;
}
if(ok3)
{
char ch;
cout<<"(y/n)"<<endl;
cin>>ch;
if(ch=='n'||ch=='N')
cout<<""<<money<<""<<endl;
else
cout<<" "<<money*pos>getDiscount()<<""<<endl;
}
break;
}
}
}
break;
}
}
if(ok==0)
cout<<"";
else if(ok1==0)
28

cout<<""<<endl;
else if(ok3==0)
cout<<""<<endl;
else
{
if(pos1->getN()==0)
Q.erase(pos1);
ofstream oFile("MovieInfo.txt",ios::trunc|ios::out);//

if(!oFile)
{
cout<<"Can not open the file!"<<endl;
return ;
}
for(int i=0;i<P.size();i++)
oFile.write((char *) &P[i],sizeof(Ticket));
oFile.close();
ofstream oFile1(IDName,ios::trunc|ios::out);//
oFile1.write((char *) &s1,sizeof(s1));
for(int i=0;i<Q.size();i++)
oFile1.write((char *) &Q[i],sizeof(User));
}
P.clear();
Q.clear();
}

1
//
void Interface::IntroduceFace()
{
time_t t;
tm *lt;
t = time(NULL);
lt = localtime(&t);
cout<<"\n\n\t\t\t\t"<<""<<endl<<endl;
cout<<"\t\t\t "<<lt->tm_year+1900<<"-"<<lt>tm_mon+1<<"-"<<lt->tm_mday
<<"
"<<lt->tm_hour<<":"<<lt->tm_min<<":"<<lt>tm_sec<<endl<<endl;
cout<<"\n\t\t\t
! \n"
<<"\t\t\t
/^\\ \n"
<<"\t\t\t
/
\\ \n"
29

<<"\t\t\t |
| (
) |
| \n"
<<"\t\t\t/^\\ |
/^\\ \\
/ /^\
| /^\\ \n"
<<"\t\t\t|O|/^\\
(
)|-----|(
)
/^\\|O| \n"
<<"\t\t\t|_||-| |^-^|---||-----||---|^-^| |-||_| \n"
<<"\t\t\t|O||O| |/^\\|/^\\|| | ||/^\\|/^\\| |O||O| \n"
<<"\t\t\t|-||-| ||_|||_||| /^\\ |||_|||_|| |-||-| \n"
<<"\t\t\t|O||O| |/^\\|/^\\||(
)||/^\\|/^\\| |O||O| \n"
<<"\t\t\t|-||-| ||_|||_||||
||||_|||_|| |-||-| \n\n\n\n";
cout<<"\n\n\n"<<"";
}
2
//
void Interface::display()
{
cout<<"\n\n\n\n";
cout<<"\t\t\t\t"<<"-----------------"<<endl;
cout<<"\t\t\t\t"<<"|
1
|"<<endl
<<"\t\t\t\t"<<"|
2
|"<<endl;
cout<<"\t\t\t\t"<<"|
3
|"<<endl
<<"\t\t\t\t"<<"-----------------"<<endl
<<"\n\n\n"
<<"\t\t\t\t"<<"";
}

3
//
void Interface::ManagerFace()
{
cout<<"\n\n\n";
cout<<"\t\t\t\t"<<"
"<<endl<<endl
<<"\t\t\t\t"<<"------------------------"<<endl
<<"\t\t\t\t"<<"|
1
|"<<endl
<<"\t\t\t\t"<<"|
2
|"<<endl
<<"\t\t\t\t"<<"|
3
|"<<endl
<<"\t\t\t\t"<<"|
4
|"<<endl
<<"\t\t\t\t"<<"|
5
|"<<endl
<<"\t\t\t\t"<<"|
6
|"<<endl
<<"\t\t\t\t"<<"------------------------"<<endl<<endl
<<"\t\t\t\t"<<"";
}

30

5
//
void Interface::CustomerFace()
{
cout<<"\n\n\n";
cout<<"\t\t\t\t"<<" "<<endl<<endl
<<"\t\t\t\t"<<"--------------------"<<endl
<<"\t\t\t\t"<<"|
1
|"<<endl
<<"\t\t\t\t"<<"|
2
|"<<endl
<<"\t\t\t\t"<<"|
3
|"<<endl
<<"\t\t\t\t"<<"--------------------"<<endl<<endl
<<"\t\t\t\t"<<"";
}

3
//
int main()
{
system("color 006");
Interface cfy;
UserInfo command;
int choice1;
cfy.IntroduceFace();
getchar();
system("cls");
cfy.display();
while(1)
{
cin>>choice1;
getchar();
switch(choice1)
{
31

case 1:
command.Login();
break;
case 2:
command.Register();
break;
case 3:
default:
exit(0);
}
}
system("pause");
}

32

33

3:

34

35

36

37

38

39

10

40

11

41

12

42

43

44

TicketManagerCustom
User UserInfo
FaceInfo Menu

vector
vector vector

Ticket bool map[10][10]


0 map[i][j] 1

+1900+1
timecmpint a[],int b[],int n-110

CFY 1101
txt

txt
abc ifstream abc.txt
abc

<<>>

45

write read

1000

12

Ticket yearmonth
timecmp
Custom save read

46

You might also like