rahulkumaran / parking_lot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parking Lot

The folder consists of the files required to make this program run. The base structure is kept as it is.

New files that have been added are :

  1. main.py --> Consists code for parsing and sending commands to main class
  2. parking/ --> Folder consists of parking.py that has 2 classes ParkingLot and Cars with the required functions.
  3. test.py --> Consists of code for testing this program

The files that were edited were :

  1. bin/setup --> Commands to run the tests and compile the necessary python files are placed here.
  2. bin/parking_lot --> Commands to run the python script is placed here.

The assumptions made were :

  1. The input file will always be kept in the base folder or in a folder inside the base folder.

The program gives the required output and also, some additional features mentioned below were added.

  1. Incase the command is not recognised by program, it says Command not recognised! but keeps the terminal running
  2. An error message is placed incase inputs aren't of the right format. For example, if while creating a parking lot, someone passes abc as an argument for number of slots, the error message is sprung up by the program but the program won't quit.
  3. An actions function has been added to the class to ensure that the command is parsed and sent to the right functions to perform as required.
  4. In the interactive terminal mode of this program, the program goes on until you type exit whereas in the file input mechanism, the program runs until end of file and quits provided exit is not given anywhere in the list of commands in the file.
  5. Exception handling has been done for most functions.

About

License:MIT License


Languages

Language:Python 58.7%Language:Ruby 36.3%Language:Shell 5.0%