Question: Need help with this Java question in 1 hour please JAVA Using the files from the in-class assignment add two additional animals of your choice.

Need help with this Java question in 1 hour please

JAVA

Using the files from the in-class assignment add two additional animals of your choice. For each animal add two additional methods appropriate to your particular animal.

As the majority of the code for this program exists you will not need an algorithm. Use the 3 java classes below. Thank you

//Animal.java

public class Animal {

public Animal() {

System.out.println("A new animal has been created!");

}

public void sleep() {

System.out.println("An animal sleeps...");

}

public void eat() {

System.out.println("An animal eats...");

}

}

//Cat.java

public class Cat extends Animal {

public Cat() {

super();

System.out.println("A new cat has been created!");

}

@Override

public void sleep() {

System.out.println("A cat sleeps...");

}

@Override

public void eat() {

System.out.println("A cat eats...");

}

}

//Bird.java

public class Bird extends Animal {

public Bird() {

super();

System.out.println("A new bird has been created!");

}

@Override

public void sleep() {

System.out.println("A bird sleeps...");

}

@Override

public void eat() {

System.out.println("A bird eats...");

}

}

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!