Skip to content

NishatMehdi21/OOP_Final_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

40 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš— MotoMetrics โ€“ Vehicle Wear & Tear Simulation System

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.


๐Ÿ“Œ Project Overview

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.


โœจ Features

๐Ÿ” User Authentication

  • User registration and login system
  • Persistent user storage
  • Session management

๐Ÿš™ Multi-Vehicle Management

Support for:

  • Cars
  • Motorcycles
  • Trucks

Users can:

  • Add vehicles
  • View vehicle details
  • Remove vehicles
  • Track vehicle health

๐Ÿ“Š Health Monitoring System

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.

๐Ÿ›ฃ๏ธ Trip Simulation

Simulate trips using:

  • Distance traveled

  • Terrain type

    • City
    • Highway
    • Hilly
    • Off-Road
    • Mixed
  • Vehicle load

  • Driver behavior

โš ๏ธ Driver Behavior Analysis

Detects:

  • Hard Braking
  • Overspeeding
  • Aggressive Driving
  • Long Driving Hours

๐Ÿ”ง Wear & Tear Engine

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)

๐Ÿ’ก Intelligent Advice System

Provides recommendations based on:

  • Vehicle health score
  • Driver behavior profile

Advice categories include:

  • Excellent
  • Good
  • Moderate
  • Concerning
  • Dangerous

๐Ÿ’พ Data Persistence

Data is stored locally using text files:

  • users.txt
  • vehicles.txt

Information remains available between application sessions.

๐Ÿ“„ Report Generation

Generate and save:

  • Vehicle health reports
  • Trip reports
  • Maintenance recommendations

๐Ÿ—๏ธ Technologies Used

  • Java
  • Java Swing
  • Object-Oriented Programming (OOP)
  • File Handling
  • Collections Framework (ArrayList)

๐ŸŽฏ OOP Concepts Implemented

Encapsulation

Private fields with controlled access through getters and setters.

Inheritance

Vehicle serves as the abstract parent class for:

  • Car
  • Motorcycle
  • Truck

Polymorphism

Vehicle subclasses override health scoring and reporting behavior.

Abstraction

Implemented using the abstract Vehicle class.

Interface Implementation

Diagnosable interface defines:

calculateDamage()
generateReport()

๐Ÿ“‚ Project Structure

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)

๐Ÿ–ฅ๏ธ GUI Modules

Login Panel

User authentication and account access.

Register Panel

Create new user accounts.

Dashboard

View all vehicles with color-coded health scores.

Add Vehicle

Add Cars, Motorcycles, or Trucks.

Vehicle Details

View health statistics and maintenance reports.

Trip Simulation

Configure trip parameters and driver behavior.

Advice Screen

Receive recommendations and trip analysis.


๐Ÿ“ˆ Health Scoring System

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

๐Ÿš€ How to Run

Prerequisites

  • Java JDK 8 or higher
  • IDE (IntelliJ IDEA, Eclipse, NetBeans, or VS Code)

Steps

  1. Clone the repository
git clone https://github.com/your-username/MotoMetrics.git
  1. Open the project in your IDE

  2. Compile and run:

OOP_Final_Project.java
  1. Register a new account and start managing vehicles.

๐Ÿ”ฎ Future Improvements

  • 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

๐Ÿ‘จโ€๐Ÿ’ป Authors

Nishat Mehdi

Muhammad Hadi Azeem


๐Ÿ“š Academic Information

Course: Object-Oriented Programming (OOP) Project: Final Semester Project Title: MotoMetrics โ€“ Vehicle Wear & Tear Simulation System


โญ If you found this project interesting, consider giving the repository a star!

About

CSC241- Objected Oriented Programming Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages