Question: Using Java Create an Animal interface with two methods: eat() and move(). Write a class called Mammal that implements Animal and the eat() but does
Using Java
Create an Animal interface with two methods: eat() and move(). Write a class called Mammal that implements Animal and the eat() but does not implement move(). Mammal should also have a static method called walk(). Create a Human class that extends Mammal, overrides eat() and has a static method called walk(). Create three objects as follows:
Anima l one = new Human(); Mammal two = new Human(); Human three = new Human();
Call each of the methods for each of the objects: eat(), move(), walk(). Note the results.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
