Data Structures and Algorithms in Java

This is a discussion on Data Structures and Algorithms in Java within the JDBC JAVA forums in Framework and Interface Programming category; 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. ...

Go Back   Application Development Forum > Framework and Interface Programming > JDBC JAVA

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 01-14-2006, 08:27 AM
TKK
Guest
 
Default Data Structures and Algorithms in Java

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.

Reply With Quote
  #2  
Old 01-14-2006, 10:13 AM
David Harper
Guest
 
Default Re: Data Structures and Algorithms in Java

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
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 05:30 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.