数据结构课程设计之飞机订票系统

上传人:s9****2 文档编号:491586726 上传时间:2023-05-11 格式:DOCX 页数:32 大小:345.68KB
返回 下载 相关 举报
数据结构课程设计之飞机订票系统_第1页
第1页 / 共32页
数据结构课程设计之飞机订票系统_第2页
第2页 / 共32页
数据结构课程设计之飞机订票系统_第3页
第3页 / 共32页
数据结构课程设计之飞机订票系统_第4页
第4页 / 共32页
数据结构课程设计之飞机订票系统_第5页
第5页 / 共32页
点击查看更多>>
资源描述

《数据结构课程设计之飞机订票系统》由会员分享,可在线阅读,更多相关《数据结构课程设计之飞机订票系统(32页珍藏版)》请在金锄头文库上搜索。

1、於,_青岛理工大学数据结构课程设计报告1褰验艇+紂瓠金rr劉的叙I爰级参粛仙 Pacount=0;headline-next=NULL;clienthead *headclient = new clienthead;headclient-count=0;headclient-next=NULL;while(1)main_menu();int n;cou t请选择您老人家要进行的操作:;cinn;coutendl;switch(n)case 1:int num;cou t请选择您老人家要录入的航班的数目:;cinnum;coutendl;import(num,headline);coutendl

2、;/display_all_line(headline);cou t航班信息成功录入。;coutendlendl;break;case 2:loadmessage(headline,headclient);break;case 3:airline *find;find=query(headline);if(find)display_line(find);break;case 4:bookticket( headline,headclient); /display_all_client(headclient);break;case 5:returnticket(headline,headclie

3、nt);break;case 6:savemessage(headline,headclient);break;case 7:display_all_line(headline);break;case 8:display_all_client(headclient);break;case 0:exit(1);break;/*订票函数的实现*/ int bookticket(airlinehead * headline,clienthead *headclient) /订票coutline_num;airline *temp;temp=headline-next;while(temp)if(st

4、rcmp(temp-line_num,line_num)=0) break;temp=temp-next;if(!temp)cout 未找到该航班left=0)cout对不起,该航班票已经售完。endl; cout请选择其他合适的航班:;client *custom=new client;cout custom-id;coutendl;coutcustom-name;coutseat_num=temp-total - temp-left + 1; custom-next=NULL;strcpy(custom-line_num,line_num);temp-left-;headclient-count+; custom-next = headclient-next; headclient-next = custom;cout订票成功,祝您旅途愉快。;return 1;/*退票函数的实现*/int returnticket(airlinehead * headline,clienthead *he

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

当前位置:首页 > 学术论文 > 其它学术论文

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