Answered step by step
Verified Expert Solution
Link Copied!

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 1)
-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 use/return a deep copy of the Engine object (not a reference copy)
Task 2)
Implement the following chain of inheritance:
Level 1: Animal class
protected fields: species (String),age (int),habitat (String)
public methods: Constructor for initialization, setters, getters, and displayInfo().
Level 2: Bird class (subclass of Animal class)
protected fields: canFly (boolean)
public methods: Constructor for initialization, setter & getter for canFly, and overridden displayInfo().
Level 3: 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 3)(Optional)
Draw the UML diagrams for Task 2,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 task/problem 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!
Task1: Engine.java, Car.java
Task2: Animal.java, Bird.java, Canary.java
Task3: UMLDiagrams.(pdf,png,doc, docx, jpg)
Thank you!
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Q.No.1 Explain Large scale map ? Q.No.2 Explain small scale map ?

Answered: 1 week ago

Question

2. Define communication.

Answered: 1 week ago