Valet Parking System

author image
Dev Soni24th Jan 2024

Valet Parking System

GITHUB LINK - https://github.com/DevS0ni/Valet-Parking-Application-Project

Description: The Valet Parking System is a C++ application designed to manage the operations of a valet parking service. The system allows for the parking and retrieval of vehicles, maintaining a record of parked vehicles, providing parking tickets, and handling various functionalities related to valet parking.

Tech Stack:

  • Programming Language: C++
  • File Handling: ifstream, ofstream (for reading and writing data files)
  • Object-Oriented Programming (OOP): Utilizes classes and polymorphism for managing different types of vehicles (Car, Motorcycle) and Modular Approach.
  • Dynamic Memory Management: Allocates and deallocates memory for vehicle objects during runtime.
  • User Interaction: Utilizes console-based user interfaces for input and output.
  • Data Storage: Saves and loads vehicle records to/from data files.

Key Components:

  1. Parking Module:
    • Constants: Defines a constant for the maximum number of parking spots.
    • Attributes: Tracks the number of spots, number of parked vehicles, and an array of vehicle pointers representing parking spots.
    • Constructor: Initializes the parking module with the number of spots, checks for validity, and initializes parking spots array.
    • Private Methods: Implements various functionalities such as checking if the parking is empty, printing parking status, loading and saving data, listing parked vehicles, finding vehicles, parking a vehicle, and returning a vehicle.
    • Exit Parking Function: Closes the parking by towing remaining vehicles.
  2. Vehicle Class:
    • Polymorphism: Utilizes polymorphism to handle different types of vehicles (Car, Motorcycle) through a common base class.
    • Attributes: Stores information such as license plate number, make, and model of the vehicle.
    • Dynamic Memory: Allocates and deallocates memory for vehicle objects dynamically.
    • Comma Separated Value Mode: Supports reading and writing vehicles in comma-separated value mode.
  3. Date Module:
    • Date Handling: Manages date-related operations, supporting the tracking of vehicle entry and exit dates.

Testing:

  • Functional Testing: Validates each functionality of the valet parking system, including parking, returning, listing, finding, and closing the parking.
  • Edge Cases: Tests scenarios with the maximum number of parking spots, invalid inputs, and situations where the parking is full.
  • Data Persistence: Verifies that data is correctly loaded and saved from/to data files.

Conclusion: The Valet Parking System is a robust C++ application that efficiently manages the operations of a valet parking service. By incorporating OOP principles, dynamic memory management, and user-friendly interfaces, the system provides a comprehensive solution for handling vehicles, ensuring a smooth and organized valet parking experience.

author image

Dev Soni

Connect with me

© Copyright 2024. All right reserved, Dev Soni.