The Parking Lot Management System is a Java-based application designed to facilitate the management of a parking lot. It allows users to initialize the parking lot with multiple floors and spaces, add vehicles to the parking lot, park and remove vehicles, and calculate parking fees based on various parameters.
The implementation of the Parking Lot Management System follows object-oriented principles and design patterns to ensure modularity, scalability, and maintainability. The system consists of several key components:
- ParkingLot: Represents the parking lot and manages its operations.
- Floor: Represents a floor in the parking lot and manages parking spaces.
- Vehicle: Represents a vehicle with attributes such as vehicle type, registration number, and entry timestamp.
- ParkingSpace: Represents a space for parking a vehicle on a floor.
- ParkingFeeCalculator: An interface for calculating parking fees, with concrete implementations for different fee calculation strategies.
- HourlyParkingFeeCalculator: Concrete implementation of
ParkingFeeCalculator
for calculating fees based on hourly rates. - DailyParkingFeeCalculator: Concrete implementation of
ParkingFeeCalculator
for calculating fees based on daily rates.
- Initially, I carefully analyzed the problem statement provided by the interviewer to understand the requirements and constraints of the Parking Lot Management System.
- I designed a class diagram outlining the main classes and their relationships to visualize the system's structure.
- With the problem statement in mind, I started implementing the core functionalities of the system, such as initializing the parking lot, adding floors, parking vehicles, and calculating parking fees.
- Throughout the implementation process, I sought assistance from an AI assistant to clarify doubts, discuss design decisions, and receive guidance on best practices.
- The AI assistant provided step-by-step guidance, helped identify potential issues, and suggested improvements to the codebase.
- After completing the implementation, I conducted thorough testing to validate the correctness and functionality of the system.
The Parking Lot Management System is a robust and scalable solution for efficiently managing parking lots. By following object-oriented principles and leveraging assistance from an AI assistant, I successfully implemented the system while ensuring modularity, extensibility, and maintainability.
- Clone the repository:
git clone https://github.com/kumarprem66/ParkingLot.git
2.Navigate to the project directory:
cd car-parking-system
- Build the project using Maven:
mvn clean install
To build the project from the JAR file, follow these steps:
-
Download the latest release JAR file from the Releases page.
-
Open a terminal or command prompt and navigate to the directory containing the JAR file.
-
Run the following command to execute the JAR file:
java -jar Parking-1.0-SNAPSHOT.jar
- Maven
- Lombok
Contributions are welcome! Feel free to open an issue or submit a pull request for any improvements or additional features.