Question: Your project should include the following Java concepts : A base class called Car with different instance variables and at least 3 methods 1 derived
Your project should include the following Java concepts :
A base class called Car with different instance variables and at least 3 methods
1 derived class called HybridCar class that show overriding and overloading of methods. As well a derived class called HybridCar.
Default constructor and all argument constructor
The toString method
Use of the Object equals and hashCode methods (at least once)
Use of at least 1 interface
Make use and demonstrate OOP Concepts such as abstraction, polymorphism, inheritance, etc.
Make use of a fixed size array of Java Collection
Try-catch block and error handling
Implement 2 custom exceptions called: PhantomBreakingException.
Customize your implementation as desired and make adjustments when ever details are NOT specified.
Clearly demonstrate the FULL and complete functionality of the Menu driven Command Line Interface (CLI) Java application.
Task Car and HybridCar
Proposed Class hierarchy can be: Car and HybridCar.
A base abstract class called Car with an abstract method called drive and the following parameters consists of the following 5 fields :
a) a make
b) a model
c) year
A Java interface called ecoboost with 1 method called fueleconomy with 2 arguments called distance, road conditions as follows :
public interface ecoboost {
public void fueleconomy(int distance, string roadconditions);
}
The derived class called HybridCar that extends Car and adds the following attribute :
d) engine type
e) an efficiency index
(Sample DATA can be, eg.: Toyota, Prius Plugin, 2020, hybrid gas-electric, 0.96)
Custom Exceptions called: PhantomBreakingException.
Choose of the following options:
Allow the user to enter details of a Car or HybridCar :
Provide a 2nd menu with available cars : Basic Car (NOT hybrid) or a HybridCar. Different makes/models/years such as: Tesla, Rivian, Hyundai Ionic, Nissan Leaf, Chevy Bolt, etc..
Choose the type of car and calculate the available range, accuracy, efficiency or some other metric.
Depending on the type of propulsion used, characteristics and features of the car, etc.
Give the option to the user to repeat another calculation or Exit
At some point you need to display :
Improving every day. Better range. Better speed and acceleration (performance) !!!!.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
