航空客运订票系统课程设计(数据结构)分解(6)

2019-03-10 14:16

武汉长江工商学院计算机技术系

cout<<\

cout<<\*********************\

DisplayClient(p->book);

cout<<\*********************\

} }

return NULL;

} p=p->next;

DisplayClient(p->wait); return p;

候补乘客

void Displaydes(AirPlane *flight,char d[]) //按目的地输出航班 {

AirPlane *p=new AirPlane; p=flight; int flag=0; while(p) {

if(strcmp(p->des,d)==0) {

flag=1;

cout<<\ Destination Flight Ticket Time \

cout<num<des

26

武汉长江工商学院计算机技术系

}

}

<flight<ticket;

PrintDate(p->time); cout<next;

if(flag==0)

cout<<\

void Creat(AirPlane *&flight) //录入航班 {

AirPlane *p; AirPlane *s=flight; Passenger *b,*w; char ch; do {

p=new AirPlane; b=new Passenger; w=new Passenger; b->next=NULL; w->next=NULL; p->book=b; p->wait=w;

27

武汉长江工商学院计算机技术系

}

system(\

cout<<\cin>>p->flight;

cout<<\cin>>p->ticket;

cout<<\cin>>p->des; InputDate(p->time);

cout<<\cin>>p->num;

cout<<\cin>>ch; system(\p->next=s->next; s->next=p;

}while(ch=='y'||ch=='Y');

void Display(AirPlane *flight) //输出航线 { int n;

cout<<\按终点查询 2.按航班查询\cout<<\cin>>n;

28

武汉长江工商学院计算机技术系

}

if(n==1) { }

else if(n==2) { } else

cout<<\cout<<\char f[20]; cin>>f;

Displayflight(flight,f); char d[20];

cout<<\cin>>d;

Displaydes(flight,d);

system(\

void Book(AirPlane *&flight) //订票 {

AirPlane *p=new AirPlane,*f=NULL; char line[20];

cout<<\cin>>line;

29

武汉长江工商学院计算机技术系

system(\

f=Displayflight(flight,line); //查找乘客要订的航班是否存在

if(f) { InputPassenger(f->book,f); Displayflight(flight,line);

} else

cout<<\}

void ReturnTicket(AirPlane *&flight) { AirPlane *p=new AirPlane,*f=NULL; char line[20]; char name[20];

cout<<\ cin>>line;

f=Displayflight(flight,line); if(f) { Passenger *p=f->book->next; Passenger *q=f->book;

int flag=0;

30

//退票


航空客运订票系统课程设计(数据结构)分解(6).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:山西生态环境问题及其保护对策

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: