| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| How to write a program that can simiulate a car-parking garage that can handle unlimited number of cars. The garage is very narrow such that its' width can accomodate only one car. There is only one entry point to the garage at one of its end where the car can be parked or taken out of the garage. Your car parking garage consists of two garages where only one of the garage is used as the parking area. The other garage is used as temporary area for the other cars that is blocking the car that need to move out. The other cars moved to the temporary garage will be stored back to the main garage once the intended car is taken out. Input file: A,ABA1234 A,ABC6789 - - D,ABC6789 A,ZXC2345 - A,QWE3456 - D,ZXC2345 - - X Each line of input represent 1 minute of time. The input file will consist of 60 lines and will be terminated by an marker X. |
|
#2
| |||
| |||
| TKK wrote: > How to write a program that can simiulate a car-parking garage that can > > handle unlimited number of cars. The garage is very narrow such that > its' width can accomodate only one car. There is only one entry point > to the garage at one of its end where the car can be parked or taken > out of the garage. Your car parking garage consists of two garages > where only one of the garage is used as the parking area. The other > garage is used as temporary area for the other cars that is blocking > the car that need to move out. The other cars moved to the temporary > garage will be stored back to the main garage once the intended car is > taken out. > [SNIP] Does your professor know that you are posting assignment questions on the Internet and asking for solutions? If someone told your professor, he could kick you out of the university. David Harper Cambridge, England |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.