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:
equalscompares two objects based on the field values: If they match, it returns true; if not, false
toStringprints 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 Stringage inthabitat 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 displayInfomethod
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, and some commentary on what each code does would be incredibly helpful for me to understand better!
Task: Engine.java, Car.java
Task: Animal.java, Bird.java, Canary.java
Task: UMLDiagrams.pdfpngdoc 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