Question: i need solution of problem 3. Problem #3 (10 marks) a) Create an interface called Sound that contains 1 method called getSound. b) Create an


i need solution of problem 3.
Problem #3 (10 marks) a) Create an interface called Sound that contains 1 method called getSound. b) Create an interface called Movement that contains 1 method called getMovement. c) Modify the 4 classes from Problem #2 to implement the Sound and Movement interfaces. Owls hoot (sound) and fly (movement); donkeys hee-haw and walk; frogs ribbit and jump d) The classes described in c) should also implement the Comparable interface. (that is, they implement 3 interfaces) Owls are compared by wing span, donkeys by weight, and frogs by how long they are. Create an application that thoroughly tests the classes described above. Your application should demonstrate that all 3 interfaces have been successfully implemented. (Note the compareTo method must be tested for each type of animal) Lastly create a Sound array with at least 2 animals of each type (hawks, elephants, and snakes) and verify the interface works correctly using polymorphism to access the getSound method. e) f) Assignment Submission: na to the Moodle before the due date
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
