An implementation for the Parking Lot machine coding interview question
Design a parking lot system with the below mentioned capabilities
-
Create a parking lot with given no of floors and parking slots
-
Park a vehicle with given registration number and color and return a ticket
-
Unpark a vehicle from the ticket provided
-
Get free-slots / total-free-slots for particular vehicle
-
Get occupied slots for a particular vehicle
More details about the problem can be found here - workattech | Parking Lot
In order to run this project, you need to install NodeJs on you system if not already installed
It can be installed from the official NodeJs page - Install NodeJs
Steps to run the application
-
Create a test file with any name that you like on the root level (same level as command.txt) and add all the commands in that file or use the existing command.txt file present
-
Run
npm install
to install all the dependencies -
To execute the commands, run
npm start <fileName>