Question: Draw a class inheritance diagram for the following set of classes. Class Goat extends Object and adds a member variable tail and functions milk

Draw a class inheritance diagram for the following set of classes.
• Class Goat extends Object and adds a member variable tail and functions milk and jump.
• Class Pig extends Object and adds a member variable nose and functions eat and wallow.
• Class Horse extends Object and adds member variables height and color, and functions run and jump.
• Class Racer extends Horse and adds a function race.
• Class Equestrian extends Horse and adds a member variable weight and functions trot and is Trained.

Step by Step Solution

3.48 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Data Structures And Algorithms In C++ Questions!