Question: object oriented programming Write this code in netbeans and the output must be Question 1: Create a JAVA project called Zoo to design and implement

object oriented programming
Write this code in netbeans
 object oriented programming Write this code in netbeans and the output
and the output must be
must be Question 1: Create a JAVA project called Zoo to design

Question 1: Create a JAVA project called Zoo to design and implement a hierarchy to model the different types of animals that encapsulates common attributes and behaviors of all types of animals. Additionally, create a subclass named Mammal to represent a Mammal. A. The superclass Animal should include the following: 1. A protected instance variable species of type String. 2. Two private instance variables; uniqueID of type String and birthYear of type int. 3. A parameterized constructor to initialize the instance variables. 4. Appropriate getter and setter methods for the uniqueID and birthYear variables. The uniqueID attribute must be in the format "AN2345Z" (two letters 'AP' followed by five digits and ends with the letter ' Z '). s. An instance method named display that prints all relevant details of the Animal. B. The subclass Mammal should inherit the instance variables and methods of the Animal class. And it should include the following: 1. Private instance variables for the mammal; furColor: String and numberOfLegs: int. 2. A parameterized constructor to initialize the instance variables. 3. Override the display method to display all details of the Mammal. 4. An instance method called is WarmBlooded that takes a temperature: int parameter. The method should return true if the mammal's temperature range is within [35C42C] and false otherwise. 5. Override the equals method to compare two mammals based on their furColor. The method should return true if the fur colors are the same, and false otherwise. C. Implement a test class (main method only) that performs the following: 1. Create two objects of type Mammal using the parameterized constructor with appropriate initial values of your choice. 2. Call the display method for both objects. 3. Check if the first object is equal to the second object. If the first object is equal to the second object, print "Equal"; otherwise, print "Not Equal". 4. Check and print the result of calling isWarmBlooded for both mammal objects with a tempreture of 37,34. Output Sample: Details of Mammal 1: Species: Lion Unique ID: AN12345Z Birth Year: 2018 Fur Color: Golden Number of Legs: 4 Details of Mammal 2: Species: Elephant Unique ID: AN67890X Birth Year: 2015 Fur Color: Gray Number of Legs: 4 Not Equal Is Lion Warm-Blooded at Is Elephant Warm-Bloode

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!