南邮泊车管理系统程序设计报告内容摘要:

break。 case 3:break。 default:system(color Fc)。 coutendl\t\t\t\t输入格式不正确。 endl。 _sleep(1000)。 break。 } if(choice==3)break。 } return。 } void arrive() //汽车到达 { int choice=1。 if(top==20amp。 amp。 flag==20) throw erroFull()。 //小车数目满则抛出异常 for(。 ) { system(cls)。 //清 屏函数调用 printStar()。 //打印星号函数 cout\t\t\t\t欢迎进入本泊车管理界面 endlendl。 printLine()。 //划线函数 cout\t\t\t| \t\t\t |endl。 /*打印两个空格 */ printLine()。 //划线函数 cout\t\t\t| \t\t\t |endl。 printLine()。 //划线函数 10 cout\t\t\t| \t\t\t |endl。 printLine()。 //划线函数 printStar()。 //打印星号 cout\t\t 请输入您的选项 13 :。 //二级菜单函数 cinchoice。 //选择菜单函数 switch(choice) //选择菜单函数 { case 1:potLG()。 break。 case 2:passLG()。 break。 case 3:break。 default:system(color Fc)。 coutendl\t\t\t\t输入格式不正确。 endl。 _sleep(1000)。 break。 } if(choice==3)break。 } return。 } /*void readwriteDAT() { long *temp。 FILE *rf,*wf。 rf=fopen( , r )。 wf=fopen( , w )。 fscanf(rf, %ld ,amp。 temp)。 feep(temp)。 fprintf(wf, %ld ,temp)。 fprintf(wf,\n )。 fclose(rf)。 fclose(wf)。 } */ double feep(time_t* tmp) //时间差的 计算 { int m=0,min=0,sec=0。 //设置数据用来计算时间间隔,停车时、分、秒。 double gap=0,hour=0。 local=localtime(tmp)。 // 11 将存储的时间转化为当地时间日历 coutlocaltm_hour:localtm_min:localtm_secendl。 //显示停车时刻 hour=localtm_hour。 //保存停车时刻 min=localtm_min。 sec=localtm_sec。 now=time(NULL)。 nowp=localtime(amp。 now)。 cout\t 当 前 时 间 :\tnowptm_hour:nowptm_min:nowptm_secendl。 //显示当前时间 hour = nowptm_hourhour。 //求出停车的时间间隔 min= nowptm_minmin。 sec= nowptm_secsec。 if(sec0){min。 sec=60+sec。 } //进行秒、分钟、秒时间转换 if(min0) {hour。 min=60+min。 } cout\t汽车共停 \t hour小时 min分 sec秒 endl。 if(min30) gap=hour+。 else gap=hour+1。 //停车应收费的时间(单位:小时) return gap。 } void cul() { int s=5,m=0,h=0。 Clock c。 (h,m,s)。 ()。 printf(\n\tThe time is over!!!\a\n)。 } void cacutime() //预约时间计算函数 { 12 try { if(top==20) throw erroFull()。 //车满抛出异常 system (cls)。 //清屏函数 printStar()。 //打印星号 cout\t\t\t\t欢迎进入预约界面 endl。 coutendl\t\t\t停车场共有 20 个车位,现共停 (含预约 )top个车位。 endlendl。 char numCar。 cout\t\t\t 请输入车牌的数字部分:。 cinnumCar。 coutendl\t\t\t。 车位预约成功,系统将在一秒后返回上层界面。 endl。 top++。 _sleep(1000)。 //当前休眠一秒 cul()。 } catch(erroFull amp。 err) { ()。 } return。 } void resure() { return。 13 } void passOut() //小车离开 { FILE *out。 out = fopen(, ab+)。 try { if(flag==0) throw erroEmp()。 double fee=0。 system(cls)。 printStar()。 cout\t\t\t\t您进入了小车离开界面 endl。 cout\t\t\t将要离开车的信息清单: endl。 cout\t 车牌号码: \ta[front]carNum\。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。