Question: Write a superclass named Animal and two subclasses named Feline and Canine. The Animal constructor should have a private instance variable called sound; its constructor
Write a superclass named Animal and two subclasses named Feline and Canine. The Animal constructor should have a private instance variable called sound; its constructor should initialize it In Animal add apure virtual function move that is implemented by the subclasses. Add a speak method that returns the instance variable. In both Feline and Canine, implement a constructor that takes both a sound and a means of moving; its constructor should initialize correctly. Implement the virtual function. Ensure that all details are handled.
Paragraph
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
