0% found this document useful (0 votes)
4 views1 page

Java OOP Challenge

The document outlines a project for a Smart Transportation & Delivery System using advanced Java OOP principles. It specifies the creation of an abstract Vehicle class and its subclasses, along with classes for Driver, Delivery, MaintenanceRecord, and FleetManager, emphasizing the use of abstract classes and polymorphism. Additionally, it addresses constraints, edge cases, and bonus challenges related to fuel management and logging.

Uploaded by

oteaching351
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Java OOP Challenge

The document outlines a project for a Smart Transportation & Delivery System using advanced Java OOP principles. It specifies the creation of an abstract Vehicle class and its subclasses, along with classes for Driver, Delivery, MaintenanceRecord, and FleetManager, emphasizing the use of abstract classes and polymorphism. Additionally, it addresses constraints, edge cases, and bonus challenges related to fuel management and logging.

Uploaded by

oteaching351
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Advanced Java OOP Challenge (No Interfaces)

Project: Smart Transportation & Delivery System

Core Requirements:

1. Abstract class Vehicle with fields: id, brand, speed, fuelLevel, maxFuelCapacity.

Methods: start, stop, refuel, consumeFuel, move, toString.

2. Subclasses: Car, Truck, ElectricScooter with overridden behaviors.

3. Driver class with license validation and vehicle assignment.

4. Delivery class with assignment logic, weight constraints, and lifecycle.

5. MaintenanceRecord class for vehicle history.

6. FleetManager to manage vehicles, drivers, and deliveries.

Constraints:

No interfaces, no enums. Use abstract classes, polymorphism, and composition.

Edge Cases:

Overfueling, invalid assignments, insufficient fuel, negative values, overload handling.

Bonus Challenges:

1. Dynamic fuel strategy using inheritance.

2. Polymorphic collections of Vehicle.

3. Deep copy vs reference issues.

4. Logging system for all actions.

5. Custom exceptions like InsufficientFuelException.

You might also like