Question: Finish the code as described so that the main method will run and produce the desired output. The Animal class is abstract and has two
Finish the code as described so that the main method will run and produce the desired output.
The Animal class is abstract and has two attributes: name and age
The Animal class has methods: makeSound display
The Animal class is extended by a class Dog
When a dog does the makeSound behavior, it should print "Woof!" to the console.
Dogs have name, age, and breed attributes.
The display methods should print a description of that object.
Important considerations:
In the abstract class, which methods should be abstract and which should be concrete?
Which will need to be overridden by the Dog class?
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
