GithubHelp home page GithubHelp logo

mmahato12 / parking_lot Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 13 KB

A parking lot is an area where cars can be parked for a certain amount of time. A parking lot can have multiple floors with each floor having a different number of slots and each slot being suitable for different types of vehicles.

License: MIT License

Java 100.00%

parking_lot's Introduction

Parking_Lot

A parking lot is an area where cars can be parked for a certain amount of time. A parking lot can have multiple floors with each floor having a different number of slots and each slot being suitable for different types of vehicles.

Input/Output Format

The code should strictly follow the input/output format and will be tested with provided test cases.

Input Format

Multiple lines with each line containing a command.

Possible commands:

  • park_vehicle <vehicle_type> <reg_no>
  • unpark_vehicle <ticket_id>
  • display <display_type> <vehicle_type>
  • Possible values of display_type: free_count, free_slots, occupied_slots
  • exit Stop taking the input when you encounter the word exit.

Output Format

Print output based on the specific commands as mentioned below.

  • park_vehicle Parked vehicle. Ticket ID: <ticket_id> Print "Parking Lot Full" if slot is not available for that vehicle type.

  • unpark_vehicle Unparked vehicle with Registration Number: <reg_no> and Color : Print "Invalid Ticket" if ticket is invalid or parking slot is not occupied.

  • display free_count <vehicle_type> No. of free slots for <vehicle_type> on Floor <floor_no> : <no_of_free_slots> The above will be printed for each floor.

  • display free_slots <vehicle_type> Free slots for <vehicle_type> on Floor <floor_no> : <comma_separated_values_of_slot_nos> The above will be printed for each floor.

  • display occupied_slots <vehicle_type> Occupied slots for <vehicle_type> on Floor <floor_no> : <comma_separated_values_of_slot_nos> The above will be printed for each floor.

parking_lot's People

Contributors

mmahato12 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.