资源描述:
《C++票务信息管理程序》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、票务信息管理程序Ticket-Information-Management-Programm——肖泓0823020103干璐云0823020102李经纬0823020124--GruppenarbeitVonTESSA,VERONIKA,WILLIAM.功能分析FunctionalAnalysis设计一个在太阳星系中穿越的飞船票务信息管理程序,要求实现查询、购买、退订票务等功能;能够储存票务和车次信息;能够实现各种车票信息的添加、查询、修改等操作。Designticketinginformatio
2、nmanagementaboutaspacecraftthroughthesolarsystemthatrequirestherealizationofquery,purchase,unsubscribefromticketingandotherfunctions;Tostoreinformationonticketingandtrainnumber;Beabletoachieveaticketinformationtoadd,query,modifyetc.算法分析Algorithm1.数据结构
3、DataStructuretypedefstructtraininfor{/*车次结构体*/charstation[10][10];/*记录车站信息*/chartnumber[20];/*车次号*/floatprice;/*车票价格*/intlnumber;/*生成票量*/chartime[20];/*到站时间*/}pemp;structticket{/*车票信息结构体*/charbuyer[10];/*购票人姓名*/charsource[30];/*起始站*/chardest[30];/*终点站
4、*/intbnumber;/*购买的张数*/};2.函数定义FunctiondefinitionVoidmenu(pemp*pointtr,structsticket*pointtk)主菜单程序(由肖泓编写-TESSA)Voidbuy(pemp*pointtr,structsticket*pointtk)购买车票程序(由干璐云编写-VERONIKA)Voidreturnt(pemp*pointtr,structsticket*pointtk)退票程序(由李经纬编写-WILLIAM)Voidchec
5、k(pemp*pointtr,structsticket*pointtk)查看某起始地、目的地的车票信息(-TESSA)Voidshow(pemp*pointtr,structsticket*pointtk)显示车票信息(-VERONIKA)Voidexit()推出程序(…)算法设计和编程实验Algorithmdesignandprogrammingexperiments/*ticket.c*/#include#include#defineNUM100type
6、defstructtraininfor{charstation[10][10];chartnumber[20];floatprice;intlnumber;chartime[20];}pemp;structticket{charbuyer[10];charsource[30];chardest[30];intbnumber;};voidmenu(pemp*pointtr,structticket*pointtk);/*菜单显示程序*/voidbuy(pemp*pointtr,structticke
7、t*pointtk);voidreturnt(pemp*pointtr,structticket*pointtk);voidcheck(pemp*pointtr,structticket*pointtk);voidshow(pemp*pointtr,structticket*pointtk);voidexit();voidmain(){pemptraininformation[NUM];structticketcheque[NUM];pemp*pointtr;structticket*pointt
8、k;pointtr=traininformation;pointtk=cheque;strcpy(pointtr->station[0],"水星Mercury");strcpy(pointtr->station[1],"金星Venus");strcpy(pointtr->station[2],"火星Mars");strcpy(pointtr->station[3],"木星Jupiter");strcpy(pointtr->station[4],"土星Saturnus");strcp