sudhanshu-gupta / parking-lot

go-jek hiring challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parking Lot Service

Steps to run

Interactive Shell

  • bin/setup
  • bin/parking_lot

Through File

  • bin/setup
  • bin/parking_lot {AbsoluteFilePath}

Parking Lot Commands

Create Parking Lot

Command

create_parking_lot {capacity}

Example

create_parking_lot 6

Park Car

Command

park {Registration_No} {Colour}

Example

park KA-01-HH-1234 White

Leave Car

Command

leave {Slot_No}

Example

leave 4

Status of Parking Lot

Command

status

Registration Numbers of all parked car with given colour

Command

registration_numbers_for_cars_with_colour {Colour}

Example

registration_numbers_for_cars_with_colour White

Slot Numbers of all parked car with given colour

Command

slot_numbers_for_cars_with_colour {Colour}

Example

slot_numbers_for_cars_with_colour White

Slot Number of a parked car with given registration number

Command

slot_number_for_registration_number {Registration_No}

Example

slot_number_for_registration_number KA-01-HH-3141

Exit the program

Command

exit

About

go-jek hiring challenge


Languages

Language:Java 88.3%Language:Ruby 9.9%Language:Shell 1.8%