火车票务标准管理系统C语言火车票务管理系统课题内容和要求设计目标:设计一个火车票务管理系统,用C语言实现。对该系统的要求如下:需求描述:(1)火车时刻信息录入。包括车次、日期、起点、终点、开车时间、到达时间、票价。。(2)火车时刻信息查询。按照车次查询按终点查询按起点查询按终点和日期查询(3):建议用VC环境开发用户界面。结果形式:提交程序设计报告和可演示的系统软件二、(1)火车时刻信息录入。包括车次、日期、起点、终点、开车时间、到达时间、票价。。(2)火车时刻信息查询。按照车次查询按终点查询按起点查询按终点和日期查询(3)统计按终点统计每日的车次数按起点统计每日的车次数概要设计voidSearchTrainNum();//按照车次查询voidSearchToPlace();//按终点查询voidSearchFromPlace();//按起点查询voidSearchToPlaceAndDate();//按终点和日期查询voidCountToPlace();//按终点统计每日的车次数voidCountFromPlace();//按起点统计每日的车次数三、详细设计程序的源代码与注释#include<>#include<>#include<>voidSearchTrainNum();voidSearchToPlace();voidSearchFromPlace();voidSearchToPlaceAndDate();voidCountToPlace();voidCountFromPlace();voidStar();structTRAIN{chartrainNum[10];chardate[30]; charfromPlace[20]; chartoPlace[20]; charinTime[30]; charoutTime[30];doubleprice;};structTRAINtrain[30];intmain(){intrequest;charch='Y'; inti=0; doublemyprice;FILE*fp; repeat:Star();printf("火车管理系统界面\n"); printf(".\n"); printf(".\n"); printf(".\n"); printf(".\n");Star(); printf("\n"); printf("请输入:"); scanf("%d",&request); switch(request)//利用case分支结构 { case1: {fp=fopen(".\\","wb");//利用文件与流 if(!fp) { printf("Filecannotbeopened\n"); exit(1); }do { printf("Enter车次日期起点终点开车时间到达时间票价\n>>>"); scanf("%s%s%s%s%s%s%lf",train[i].trainNum,train[i].date,train[i].fromPlace,train[i].toPlace,train[i].inTime,train[i].outTime,&myprice); train[i].price=myprice; fwrite(&train[i],sizeof(structTRAIN),1,fp); i++; printf("continue(Y/N)(Ntoend)?"); getchar(); scanf("%c",&ch);}while(ch!='N'); fclose(fp); printf("返回主界面吗?(Y返回)"); getchar(); scanf("%c",&ch); if(ch=='Y') { printf("\n\n"); gotorepeat; } }break; case2: {printf("\n\n"); printf(">>>>>火车时刻信息查询<<<<<\n");printf(".\n"); printf(".\n"); printf(".\n"); printf(".\n");printf(".\n");printf("请输入:"); scanf("%d",&request);switch(request) { case1:SearchTrainNum();break;case2:SearchToPlace();break;case3:SearchFromPlace();break;case4:SearchToPlaceAn
火车票务标准管理系统C语言模板 来自淘豆网m.daumloan.com转载请标明出处.