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.
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_2

Step: 3

blur-text-image_step3

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

What is moral hazard and how might it affect entrepreneurial firms?

Answered: 1 week ago

Question

=+Describe an important trade-off you recently faced

Answered: 1 week ago