停车场管理系统代码_第1页
停车场管理系统代码_第2页
停车场管理系统代码_第3页
停车场管理系统代码_第4页
停车场管理系统代码_第5页
已阅读5页,还剩12页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

include include include define MaxChe 3 define Chefei 0 5 using namespace std class Time public int year int mouth int day int hour int minute int second void setTime cout Time endl cout year cout mouth cout day cout hour cout minute cout second void showTime cout year mouth day hour minute second class Che public string ID string Color string CheXing Time aTime Che Next Che void Set cout ID cout Color cout CheXing xiaoqiche xiaoka zhongka daka CheXing aTime setTime void show cout ID cout Color cout CheXing aTime showTime Che void Shouye 首页 void Input 车辆进入停车场 void Output 车辆离开停车场并计算停车费用 void Chaxun 按车牌查询停车信息 void Xianshi 显示车库中的车辆信息 void Tongji 统计车库中的车 void Bianji 修改车库中的车的信息 void Cuo1 void main Shouye void Shouye 首页 int i cout n cout t 1 汽车进停车场 n cout t 2 汽车出停车场 n cout t 3 汽车信息查询 n cout t 4 显示所有汽车 n cout t 5 汽车信息统计 n cout t i switch i case 1 system cls Input break break case 2 system cls Output break break case 3 system cls Chaxun break break case 4 system cls Xianshi break break case 5 system cls Tongji break break default cout 无此选项 endl cout 1 返回首页从新选择 h if h 1 system cls Shouye else Cuo1 void Input 车辆进入停车场 ifstream fin text txt ios in if fin cout 文件打开失败 i cout 停车场中已有车 i 辆 endl Che p MaxChe for int j 0 j p j ID p j Color p j CheXing p j aTime year p j aTime mouth p j aTime day p j aTime hour p j aTime minute p j aTime second cout p j ID t p j Color t p j CheXing t p j aTime year p j aTime mouth p j aTime day p j aTime hour p j aTime minute p j aTime second endl fin close if i MaxChe cout 车辆可以进入停车场 endl p i Set ofstream fout text txt ios out fout i 1 endl for int j 0 j i 1 j fout p j ID t p j Color t p j CheXing t p j aTime year t p j aTime mouth t p j aTime day t p j aTime hour t p j aTime minute t p j aTi me second n fout close cout endl cout 1 继续停车 endl cout 2 返回首页 h if h 1 Input if h 2 system cls Shouye if h 1 else cout cout 停车场已满 endl cout 1 返回首页 h if h 1 system cls Shouye else Cuo1 void Output 车辆离开停车场并计算停车费用 ifstream fin text txt ios in if fin cout 文件打开失败 i cout 停车场中已有车 i 辆 endl Che p MaxChe for int j 0 j p j ID p j Color p j CheXing p j aTime year p j aTime mouth p j aTime day p j aTime hour p j aTime minute p j aTime second cout p j ID t p j Color t p j CheXing t p j aTime year p j aTime mouth p j aTime day p j aTime hour p j aTime minute p j aTime second endl fin close if i 0 string cp cout 按车牌查询 endl cout cp cout 出场时间 endl Time bTime bTime setTime ofstream fout text txt ios out fout i 1 endl for j 0 j i j if p j ID cp cout endl cout 该车进入停车场时间为 cout p j aTime year p j aTime mouth p j aTime day p j aTime hour p j aTime minute p j aTime second endl cout 每分钟 Chefei 元钱 endl int money money bTime year p j aTime year 12 31 24 60 bTime mouth p j aTime mouth 31 24 60 bTime day p j aTime day 24 60 bTime hour p j aTime hour 60 bTime minute p j aTime minute 10 cout 共计 money 元钱 endl for j 0 j i j if p j ID cp int a a j for j 0 j a j fout p j ID t p j Color t p j CheXing t p j aTime year t p j aTime mouth t p j aTime day t p j aTime hour t p j aTime minute t p j aTime sec ond endl for int j a 1 j i j fout p j ID t p j Color t p j CheXing t p j aTime year t p j aTime mouth t p j aTime day t p j aTime hour t p j aTime minute t p j aTime sec ond endl cout 离场成功 endl cout h if h 1 system cls Shouye else Cuo1 break fout close else cout 停车场中无车 endl cout 1 车辆进入停车场 endl cout 2 返回首页 h if h 1 Input if h 2 system cls Shouye if h 1 void Chaxun 按车牌查询停车信息 ifstream fin text txt ios in if fin cout 文件打开失败 i cout 停车场中已有车 i 辆 endl Che p MaxChe for int j 0 j p j ID p j Color p j CheXing p j aTime year p j aTime mouth p j aTime day p j aTime hour p j aTime minute p j aTime second cout p j ID t p j Color t p j CheXing t p j aTime year p j aTime mouth p j aTime day p j aTime hour p j aTime minute p j aTime second endl fin close if i 0 string cx cout 按车牌查询 endl cout cx for j 0 j i j if p j ID cx cout endl cout p j ID t p j Color t p j CheXing t p j aTime year p j aTime mouth p j aTime day p j aTime hour p j aTime minute p j aTime second endl cout endl cout 1 删除该车信息 endl cout 2 修改该车信息 endl cout 3 返回首页 h if h 1 ofstream fout text txt ios out int a a j fout i 1 endl for j 0 j a j fout p j ID t p j Color t p j CheXing t p j aTime year t p j aTime mouth t p j aTime day t p j aTime hour t p j aTime minute t p j aTime sec ond endl for int j a 1 j i j fout p j ID t p j Color t p j CheXing t p j aTime year t p j aTime mouth t p j aTime day t p j aTime hour t p j aTime minute t p j aTime sec ond endl fout close cout 删除成功 endl cout 1 返回首页 o if o 1 system cls Shouye else Cuo1 if h 2 cout endl cout 1 修改单种信息 endl cout 2 修改多种信息 h if h 1 cout endl cout 1 修改车牌 endl cout 2 修改车色 endl cout 3 修改车型 endl cout 4 修改车辆入场时间 o if o 1 cout p j ID if o 2 cout p j Color if o 3 cout p j CheXing if o 4 cout p j aTime year cout p j aTime mouth cout p j aTime day cout p j aTime hour cout p j aTime minute cout p j aTime second if o 1 break if h 2 cout p j ID cout p j Color cout p j CheXing cout p j aTime year cout p j aTime mouth cout p j aTime day cout p j aTime hour cout p j aTime minute cout p j aTime second if h 1 ofstream fout text txt ios out int a a j fout i 1 for j 0 j i j fout p j ID t p j Color t p j CheXing t p j aTime year t p j aTime mouth t p j aTime day t p j aTime hour t p j aTime minute t p j aTime sec ond endl fout close if h 3 system cls Shouye if h 1 break if j i 1 cout 停车场中无该车 endl cout 1 车辆进入停车场 endl cout 2 返回首页 h if h 1 Input if h 2 system cls Shouye if h 1 else cout 停车场中无车 endl cout 1 车辆进入停车场 endl cout 2 返回首页 h if h 1 Input if h 2 system cls Shouye if h 1 void Xianshi 显示车库中的车辆信息 ifstream fin text txt ios in if fin cout 文件打开失败 i cout 停车场中已有车 i 辆 endl Che p MaxChe for int j 0 j p j ID p j Color p j CheXing p j aTime year p j aTime mouth p j aTime day p j aTime hour p j aTime minute p j aTime second cout p j ID t p j Color t p j CheXing t p j aTime year p j aTime mouth p j aTime day p j aTime hour p j aTime minute p j aTime second endl fin close cout 1 返回首页 h if h 1 system cls Shouye else Cuo1 void Tongji 统计车库中的车 ifstream fin text txt ios in if fin cout 文件打开失败 i cout 停车场中已有车 i 辆 endl Che p MaxChe for int j 0 j p j ID p j Color p j CheXing

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论