PBL Statement for Vehicle Rent System
Problem Statement
Efficiently managing vehicle-related data is crucial for organizations that rely on
transportation for their operations. This project focuses on developing a Vehicle
Management System (VMS) that organizes and maintains comprehensive records
of vehicles, drivers, trips, and maintenance schedules. By streamlining data
management and reporting, the system will enhance operational efficiency and
decision-making.
Objectives
Manage records for vehicles, drivers, trips, and maintenance schedules.
Allow users to add, update, delete, and display records.
Generate reports based on specific criteria, such as vehicle usage and
maintenance status.
Ensure data integrity through input validation.
System Breakdown
1. Entity Classes and Design
The system will employ object-oriented principles, using classes to represent real-
world entities.
Base Class: Vehicle
Contains common attributes like id, registrationNumber, make, model,
year, and status. Methods include adding, updating, displaying, and
validating vehicle records.
Derived Classes:
o Car: Adds attributes like seating capacity and fuel type.
o Truck: Adds attributes like load capacity and number of axles.
o Motorcycle: Adds attributes like engine displacement and type.
Driver Class:
Manages driver-specific attributes such as id, name, licenseNumber, and
availability.
Trip Class:
Stores trip details, including tripId, vehicleId, driverId, startDate,
endDate, and purpose.
Maintenance Class:
Tracks maintenance details such as maintenanceId, vehicleId,
description, date, and cost.
Each class will implement specific methods for adding, updating, displaying, and
validating records (e.g., addRecord(), updateRecord()).
2. Data Types
std::string: For text-based data (e.g., names, registration numbers).
int: For numerical data (e.g., IDs, years).
std::vector: To store collections of records (e.g., list of vehicles or trips).
3. Control Structures
If-Else Logic: To handle user actions such as adding or updating records.
Loops:
o A while loop will maintain the main program workflow.
o for loops will iterate through lists for displaying or updating records.
4. Functions
To enhance modularity, the system will include functions such as:
addRecord(): Adds a new record (vehicle, driver, trip, or maintenance).
updateRecord(): Updates an existing record.
displayRecord(): Displays a specific record.
generateReport(): Generates reports based on user-defined criteria (e.g.,
vehicle usage, maintenance costs).
validateInput(): Validates data such as vehicle registration numbers, non-
empty fields, and license numbers.
5. Inheritance and Polymorphism
Inheritance ensures code reuse, with the Vehicle class as the base.
Polymorphism enables the system to handle different vehicle types (car, truck,
motorcycle) seamlessly, using overridden methods like addRecord() and
displayRecord().
6. User Interface
The system will feature a text-based menu with options such as:
1. Add a new record (vehicle, driver, trip, maintenance).
2. Update an existing record.
3. View all records.
4. Generate reports.
5. Exit.
The interface will guide users through each task while validating inputs.
7. Error Handling and Validation
The system will validate inputs to ensure accuracy and integrity:
Input Validation: Check fields like registration number format and non-
empty entries.
Record Existence: Notify the user if trying to update or display non-existent
records.
8. Testing and Validation
Testing will confirm system reliability:
Unit Tests: Verify individual functionalities, such as adding and updating
records.
Integration Tests: Ensure the entire system operates cohesively.
Edge Cases: Handle invalid inputs gracefully (e.g., invalid dates or
duplicate IDs).
Conclusion
The Vehicle Management System (VMS) simplifies the management of vehicles,
drivers, trips, and maintenance data. With a user-friendly interface, robust input
validation, and comprehensive reporting, the system ensures efficient operations.
Its object-oriented design supports maintainability and scalability, making it
suitable for diverse organizational needs.