Coder Social home page Coder Social logo

dotnetconsoleparkingsystem's Introduction

Parking System Documentation

Overview

The parking system is designed to manage parking slots for small cars and motorcycles using a console-based interface. Each vehicle is allocated one slot, and the system tracks vehicle details such as registration number, color, and type. The system supports various commands for parking, checking out, and generating reports.

Commands and Usage

Setup

Initialize the parking lot with a specified number of slots:

$ create_parking_lot <number_of_slots>

Example:

$ create_parking_lot 6
Created a parking lot with 6 slots

Parking

Park a vehicle in the next available slot:

$ park <registration_number> <color> <vehicle_type>

Example:

$ park B-1234-XYZ White Mobil
Allocated slot number: 1

Checking Out

Free up a slot upon vehicle checkout:

$ leave <slot_number>

Example:

$ leave 4
Slot number 4 is free

Status Report

Display the current status of all parking slots:

$ status

Example:

$ status
Slot    No.         Type    Registration No Colour
1       B-1234-XYZ  Mobil   White
2       B-9999-XYZ  Motor   White
3       D-0001-HIJ  Mobil   Black
5       B-2701-XXX  Mobil   Blue
6       B-3141-ZZZ  Motor   Black

Reports

Generate various reports based on specific criteria:

  • Count of vehicles by type:
    $ type_of_vehicles <vehicle_type>
    
  • List registration numbers based on odd/even criteria:
    $ registration_numbers_for_vehicles_with_ood_plate
    $ registration_numbers_for_vehicles_with_even_plate
    
  • List registration numbers by color:
    $ registration_numbers_for_vehicles_with_colour <color>
    
  • List slot numbers by color:
    $ slot_numbers_for_vehicles_with_colour <color>
    
  • Find slot number by registration number:
    $ slot_number_for_registration_number <registration_number>
    

Exiting the Program

Terminate the program execution:

$ exit

Example Workflow

$ create_parking_lot 6
Created a parking lot with 6 slots

$ park B-1234-XYZ White Mobil
Allocated slot number: 1

$ park B-9999-XYZ White Motor
Allocated slot number: 2

$ status
Slot    No.         Type    Registration No Colour
1       B-1234-XYZ  Mobil   White
2       B-9999-XYZ  Motor   White

$ leave 1
Slot number 1 is free

$ park D-0001-HIJ Black Mobil
Allocated slot number: 1

$ type_of_vehicles Mobil
2

$ registration_numbers_for_vehicles_with_colour White
B-1234-XYZ, B-9999-XYZ

$ slot_number_for_registration_number B-9999-XYZ
2

$ exit

dotnetconsoleparkingsystem's People

Contributors

marginalfriend 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.