Question: A4. Given the following class diagram, interfaces and classes that model various kinds of animals. What will be the errors in the main method? For
A4. Given the following class diagram, interfaces and classes that model various kinds of animals. What will be the errors in the main method? For each error, indicate the line number of cach incorrect statement and explain in one sentence why it is wrong. 5 1 2 interface Animal int number of Legs); clans Tiger extends Cat class Snake implemente Reptile public int numberorlag return 0; interface Mammal Tiger 1 7 o public class Animale public static void main(String[] args) { Anisal anisali, animal2, anisa13; Manal samalt Cat cat1 Snake shake Tiger tiger 1 List
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
