Question: [10 marks in total] Note: In this UML class hierarchy, a Dog is a Mammal, but a reptile is not a mammal whereas both Dog
![[10 marks in total] Note: In this UML class hierarchy, a](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3054666781_62966f30545d6aef.jpg)
[10 marks in total] Note: In this UML class hierarchy, a Dog is a Mammal, but a reptile is not a mammal whereas both Dog and Lizard may be nameable (having nickname) and both may have some other properties and functions. In a addition to the interfaces above, add the following interfaces: 1) Comparable interface to Dog class; 2) Test it in a Testanimal class! ava implementation: Implement all required classes in Java. You may add some other roperties and methods, but you can't modify none of the current. nplement all required classes. Create a test class with at all types of object and demonstrate w to use polymorphism and different interfaces. You are expected to add all programming
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
