This is a modular, object-oriented Java console application designed to manage a mechanical workshop. It allows clients and mechanics to interact with the system by registering, booking appointments, viewing service history, and managing vehicles and services.
- Implement a complete system to manage clients, services, vehicles, and appointments.
- Apply the 4 pillars of Object-Oriented Programming:
- Abstraction
- Encapsulation
- Inheritance
- Polymorphism
- Provide a flexible architecture for future expansion.
- Develop a clean, console-based user interface.
- Differentiated access for Clients and Mechanics
- Simple username/password login system (non-persistent)
- View available mechanical or electrical services
- Filter by category, cost, or duration
- Custom cost calculation depending on service type
- Book appointments by selecting:
- A service
- A vehicle
- A date and time
- Clients can modify or cancel their appointments
- Mechanics can confirm and track appointments
- Register and store vehicle technical data
- Track service history per vehicle
User(Abstract): Base class for bothClientandMechanicVehicle: Holds vehicle technical dataService: Abstract class with specialized types (MechanicalService,ElectricalService)Appointment: Links client, vehicle, and service with a date/timeWorkshop: Manages overall capacity and dataManager Classes: Handle CRUD and business logic (e.g.,ServiceManager,AppointmentManager)
- Abstraction: Entities like
ServiceandAppointmentexpose only essential attributes and behaviors. - Encapsulation: Sensitive data (e.g., service history, states) is protected and accessible only via getters/setters.
- Inheritance:
UserβClient/MechanicServiceβMechanicalService/ElectricalService
- Polymorphism:
- Method overriding (e.g.,
calculateCost()for each service type) - Common behaviors implemented differently depending on the context
- Method overriding (e.g.,