Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I require some help on a Java project. This is being made using the Eclipse IDE software. _ _ _ _ _ _ _ _
I require some help on a Java project. This is being made using the Eclipse IDE software.
Task
Define a FuelType enum with values for different fuel types such as "Gasoline", "Diesel", "Electric"
Implement the classes below with the following instructions:
equals compares two objects based on the field values: If they match, it returns true; if not, false
toString prints out the fields of the class.
Make sure methods usereturn a deep copy of the Engine object not a reference copy
Task
Implement the following chain of inheritance:
Level : Animal class
protected fields: species String age int habitat String
public methods: Constructor for initialization, setters, getters, and displayInfo
Level : Bird class subclass of Animal class
protected fields: canFly boolean
public methods: Constructor for initialization, setter & getter for canFly, and overridden displayInfo
Level : Canary class subclass of Bird class
protected fields: color String
public methods: Constructor for initialization, setter & getter for color, and overridden displayInfo
Finally, create a class, named "CanaryDemo" to create a Canary object and call the displayInfo method.
Task Optional
Draw the UML diagrams for Task showing the inheritance in the UML diagram. You can either draw them on paper and take a picture of the paper, or use a UML diagram software generator.
I would greatly appreciate it if each taskproblem was in it's own java source code, that would be able to work together as a project.
Task: Engine.java, Car.java
Task: Animal.java, Bird.java, Canary.java
Task: UMLDiagrams.pdf png doc, docx, jpg
Thank you!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started