Skip to content

honey2156/parking-lot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parking-lot

Language : Java version : 1.8

Input via File

To install all dependencies, compile and run tests: $ bin/setup To run the code so it accepts input from a file: $ bin/parking_lot file_inputs.txt

Input via Interactive console

To install all dependencies, compile and run tests: $ bin/setup To run the program and launch the shell: $ bin/parking_lot Note that 'exit' terminates the process and returns control to the shell.

Input (contents of file):

create_parking_lot 6 park KA-01-HH-1234 White park KA-01-HH-9999 White park KA-01-BB-0001 Black park KA-01-HH-7777 Red park KA-01-HH-2701 Blue park KA-01-HH-3141 Black leave 4 status park KA-01-P-333 White park DL-12-AA-9999 White registration_numbers_for_cars_with_colour White slot_numbers_for_cars_with_colour White slot_number_for_registration_number KA-01-HH-3141 slot_number_for_registration_number MH-04-AY-1111

Output (to STDOUT):

Created a parking lot with 6 slots Allocated slot number: 1 Allocated slot number: 2 Allocated slot number: 3 Allocated slot number: 4 Allocated slot number: 5 Allocated slot number: 6 Slot number 4 is free Slot No. Registration No Colour 1 KA-01-HH-1234 White 2 KA-01-HH-9999 White 3 KA-01-BB-0001 Black 5 KA-01-HH-2701 Blue 6 KA-01-HH-3141 Black Allocated slot number: 4 Sorry, parking lot is full KA-01-HH-1234, KA-01-HH-9999, KA-01-P-333 1, 2, 4 6 Not found

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages