文件名称:my-parking
- 所属分类:
- 控制台(字符窗口)编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2013-05-14
- 文件大小:
- 237kb
- 下载次数:
- 0次
- 提 供 者:
- 丁**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
本代码实现的是一个简单的停车场管理系统。设停车场是一个可停放n辆汽车的狭长通道,且只有一个大门可供汽车进出。 汽车在停车场内按车辆到达时间的先后顺序,依次由北向南排列(大门在最南端,最先到达的第一辆车停放在停车场的最北端),若车场内已停满n辆汽车,则后来的车只能在门外的便道上等候,一旦有车开走,则排在便道上的第一辆车即可开入;当停车场内某辆汽车要离开时,在它之后进入的车辆必须退出车场为它让路,待该车辆开出大门外,其他车辆再按原次序进入车场,每辆停放在停车场的车在它离开停车场时必须按它停留时间的长短缴纳费用。试为停车场编制按上述要求进行管理的模拟程序。
基本要求为:
以栈模拟停车场,以队列模拟车场外的便道,按照从终端读入的输入序列进行模拟管理。每一组输入数据包括三个数据项:汽车“到达”或“离去”信息、汽车牌照号码以及到达或离去的时刻。对每一组输入数据进行操作后的输出信息为:若是车辆到达,则输出汽车在停车场内或便道上的停车位置;若是车辆离去,则输出汽车在停车场内停留的时间和应缴纳的费用(在便道上停留的时间不收费)。栈以顺序结构实现,队列以链表结构实现。-The implementation of the code is a simple car park management system. Suppose the parking is parked cars n the narrow channel, and only one door and out of cars. The arrival time of car in the car park by vehicle, followed by narrow (the door first to arrive at the southernmost tip of the first car in the garage, the northernmost), if the car floor is full of parked cars n , later the car can only wait on the sidewalk outside, once the car drove off, came in the first car on the sidewalk to open into when the parking of a vehicle to leave it incoming vehicles must exit the yard to make way for it to be the vehicle out outside the gate, other vehicles into the yard and then the original order, every car parked in the parking lot when it left the parking lot must stay the length of time to pay costs . Test according to the above requirements for the preparation of parking management simulation program.
The basic requirements are:
The stack analog Parking, to queue simulation car off
基本要求为:
以栈模拟停车场,以队列模拟车场外的便道,按照从终端读入的输入序列进行模拟管理。每一组输入数据包括三个数据项:汽车“到达”或“离去”信息、汽车牌照号码以及到达或离去的时刻。对每一组输入数据进行操作后的输出信息为:若是车辆到达,则输出汽车在停车场内或便道上的停车位置;若是车辆离去,则输出汽车在停车场内停留的时间和应缴纳的费用(在便道上停留的时间不收费)。栈以顺序结构实现,队列以链表结构实现。-The implementation of the code is a simple car park management system. Suppose the parking is parked cars n the narrow channel, and only one door and out of cars. The arrival time of car in the car park by vehicle, followed by narrow (the door first to arrive at the southernmost tip of the first car in the garage, the northernmost), if the car floor is full of parked cars n , later the car can only wait on the sidewalk outside, once the car drove off, came in the first car on the sidewalk to open into when the parking of a vehicle to leave it incoming vehicles must exit the yard to make way for it to be the vehicle out outside the gate, other vehicles into the yard and then the original order, every car parked in the parking lot when it left the parking lot must stay the length of time to pay costs . Test according to the above requirements for the preparation of parking management simulation program.
The basic requirements are:
The stack analog Parking, to queue simulation car off
(系统自动生成,下载前可以参看下载内容)
下载文件列表
my parking
..........\Debug
..........\.....\my parking.exe
..........\.....\my parking.ilk
..........\.....\my parking.opt
..........\.....\my parking.pch
..........\.....\my parking.pdb
..........\.....\parking.obj
..........\.....\vc60.idb
..........\.....\vc60.pdb
..........\my parking.dsp
..........\my parking.dsw
..........\my parking.ncb
..........\my parking.opt
..........\my parking.plg
..........\parking.cpp
..........\parking.h