A console-based Garage Management System built in C#/.NET to demonstrate OOP design (inheritance, polymorphism), collections, enums, and exception handling, with a clear separation between the UI layer and the logical/domain layer.
This project follows the exercise requirements: a reusable logic Class Library and a separate Console UI executable.
- Fuel Motorcycle (2 wheels, max 33 PSI, Octane 98, 5.5L tank)
- Electric Motorcycle (2 wheels, max 33 PSI, 2.5h battery)
- Fuel Car (4 wheels, max 31 PSI, Octane 95, 45L tank)
- Electric Car (4 wheels, max 31 PSI, 3.5h battery)
- Fuel Truck (12 wheels, max 28 PSI, Soler, 120L tank)
Every vehicle contains:
- Model name
- License number
- Remaining energy percentage
- Wheels (manufacturer + current/max pressure, with inflate action)
Additional fields by type:
- Motorcycle: license type (A / A1 / AA / B1), engine volume
- Car: color (Yellow / White / Red / Gray), number of doors (2–5)
- Truck: hazardous materials (bool), cargo volume
Each vehicle in the garage also stores:
- Owner name
- Owner phone number
- Status: In Repair / Repaired / Paid (new vehicles start In Repair)
- Insert a new vehicle (or update status to In Repair if it already exists)
- Display license numbers in the garage (with optional status filtering)
- Change a vehicle status
- Inflate tires to maximum
- Refuel a fuel-based vehicle (validate fuel type + range)
- Charge an electric vehicle (minutes → hours conversion, validate range)
- Display full vehicle information
- GarageLogic – Class Library: domain model + business logic only (no Console access)
- ConsoleUI – Console application: user interaction + menus, referencing
GarageLogic
- C#, .NET
- Inheritance & polymorphism
List<T>/Dictionary<TKey, TValue>- Enums
- String formatting
- Exceptions:
FormatExceptionArgumentExceptionValueOutOfRangeException(custom)
- Clone the repo:
git clone https://github.com/dorhaboosha/Garage-Management.git cd Garage-Management - Open the solution:
Garage Management.sln - Set ConsoleUI as the Startup Project
- Run (Ctrl+F5)
You can download a ready-to-run published build (Windows) from the repository:
- Go to Releases (recommended):
https://github.com/dorhaboosha/Garage-Management/releases/latest - Download the latest
Garage-Management-Publish.zip - Extract the zip file
- Run the
ConsoleUI.exefile