In: Computer Science
Given the following list of classes, attributes and
methods,
- identify which items are classes, which items are attributes and
which items are methods;
- identify which class each attribute and method belongs to;
and
- suggest a class hierarchy given your list of classes.
*Note - no particular capitalization scheme is used in the list
below to differentiate between classes, methods, and
attributes.
LandOnStatue, NumberOfLegs, Height, ShoeSize, Eat, Animal, Speak,
WingSpan, Age, Peck, Sleep, Horse, LengthOfMane, Move, BeakLength,
LengthOfTail, Bird, SaddleUp
class: Animal
attribute: Age, Height,NumberOfLegs, BeakLength,LandOnStatue
method:Eat, Speak, Sleep,
class: Horse
attribute: LengthOfMane, ShoeSize,SaddleUp, LengthOfTail
method: Move
class : Bird
attribute: WingSpan,
method:Peck
Here Animal class is Parent class.
Hourse and Bird are child class.