MotoMetrics is a Java-based desktop application that simulates realistic vehicle wear and tear using Object-Oriented Programming principles and a Java Swing GUI.
The system allows users to manage vehicles, simulate trips under different driving conditions, analyze vehicle health, and receive maintenance recommendations based on driving behavior and vehicle condition.
Vehicle maintenance is often reactive rather than proactive. MotoMetrics helps users understand how terrain, distance, load, and driving habits affect vehicle health over time.
Instead of relying on expensive hardware sensors, MotoMetrics provides a software-only simulation that models component degradation and generates actionable maintenance advice.
- User registration and login system
- Persistent user storage
- Session management
Support for:
- Cars
- Motorcycles
- Trucks
Users can:
- Add vehicles
- View vehicle details
- Remove vehicles
- Track vehicle health
Tracks:
- Engine Health
- Oil Level
- Air Pressure
- Tyre Health
- Suspension Health
- Brake Health
- Chain-Sprocket Health (Motorcycles)
Each vehicle receives an overall health score out of 100.
Simulate trips using:
-
Distance traveled
-
Terrain type
- City
- Highway
- Hilly
- Off-Road
- Mixed
-
Vehicle load
-
Driver behavior
Detects:
- Hard Braking
- Overspeeding
- Aggressive Driving
- Long Driving Hours
The system automatically applies realistic wear after each trip using:
- Terrain multipliers
- Driver behavior penalties
- Load penalties
- Distance-based degradation
Affected components include:
- Engine
- Oil
- Tyres
- Suspension
- Brakes
- Chain-Sprocket (Motorcycles)
Provides recommendations based on:
- Vehicle health score
- Driver behavior profile
Advice categories include:
- Excellent
- Good
- Moderate
- Concerning
- Dangerous
Data is stored locally using text files:
- users.txt
- vehicles.txt
Information remains available between application sessions.
Generate and save:
- Vehicle health reports
- Trip reports
- Maintenance recommendations
- Java
- Java Swing
- Object-Oriented Programming (OOP)
- File Handling
- Collections Framework (ArrayList)
Private fields with controlled access through getters and setters.
Vehicle serves as the abstract parent class for:
- Car
- Motorcycle
- Truck
Vehicle subclasses override health scoring and reporting behavior.
Implemented using the abstract Vehicle class.
Diagnosable interface defines:
calculateDamage()
generateReport()MotoMetrics
โ
โโโ Engine
โโโ Vehicle (Abstract)
โ โโโ Car
โ โโโ Motorcycle
โ โโโ Truck
โ
โโโ DriverBehavior
โโโ Trip
โโโ User
โ
โโโ LoginManager
โโโ VehicleManager
โโโ WearManager
โโโ AdviceManager
โโโ FileManager
โ
โโโ LoginPanel
โโโ RegisterPanel
โโโ DashboardPanel
โโโ AddVehiclePanel
โโโ VehicleDetailsPanel
โโโ TripPanel
โโโ AdvicePanel
โ
โโโ OOP_Final_Project (Main Class)
User authentication and account access.
Create new user accounts.
View all vehicles with color-coded health scores.
Add Cars, Motorcycles, or Trucks.
View health statistics and maintenance reports.
Configure trip parameters and driver behavior.
Receive recommendations and trip analysis.
Vehicles receive a score between 0 and 100 based on weighted component health.
Factors include:
- Engine Health
- Oil Level
- Tyre Condition
- Suspension
- Air Pressure
- Brake Health
- Chain-Sprocket Health (Motorcycles)
Score Indicators:
| Score Range | Status |
|---|---|
| 90โ100 | Excellent |
| 80โ89 | Good |
| 70โ79 | Moderate |
| 60โ69 | Concerning |
| Below 60 | Dangerous |
- Java JDK 8 or higher
- IDE (IntelliJ IDEA, Eclipse, NetBeans, or VS Code)
- Clone the repository
git clone https://github.com/your-username/MotoMetrics.git-
Open the project in your IDE
-
Compile and run:
OOP_Final_Project.java- Register a new account and start managing vehicles.
- Database integration (MySQL/PostgreSQL)
- Service reminder system
- Fuel efficiency tracking
- Graphical analytics and charts
- Additional vehicle types
- Real-time monitoring integration
- Cloud-based data synchronization
Nishat Mehdi
Muhammad Hadi Azeem
Course: Object-Oriented Programming (OOP) Project: Final Semester Project Title: MotoMetrics โ Vehicle Wear & Tear Simulation System