Draw a class inheritance diagram for the following set of classes: • Class Goat extends Object and adds an instance variable tail and methods milk() and jump(). • Class Pig extends Object and adds an instance variable nose and methods eat(food) and wallow(). • Class Horse extends Object and adds instance variables height and color, and methods run() and jump(). • Class Racer extends Horse and adds a method race(). • Class Equestrian extends Horse and adds instance variable weight and isTrained, and methods trot() and isTrained().
Draw a class inheritance diagram for the following set of classes: • Class Goat extends Object and adds an instance variable tail and methods milk() and jump(). • Class Pig extends Object and adds an instance variable nose and methods eat(food) and wallow(). • Class Horse extends Object and adds instance variables height and color, and methods run() and jump(). • Class Racer extends Horse and adds a method race(). • Class Equestrian extends Horse and adds instance variable weight and isTrained, and methods trot() and isTrained().
Related questions
Question

Transcribed Image Text:Draw a class inheritance diagram for the following set of classes:
• Class Goat extends Object and adds an instance variable tail and methods milk() and jump().
• Class Pig extends Object and adds an instance variable nose and methods eat(food) and wallow().
• Class Horse extends Object and adds instance variables height and color, and methods run() and jump().
• Class Racer extends Horse and adds a method race().
• Class Equestrian extends Horse and adds instance variable weight and isTrained, and methods trot() and
isTrained().
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
