Git-Leon c60b137cea Update README.md | 6 년 전 | |
---|---|---|
src | 6 년 전 | |
.gitignore | 6 년 전 | |
README.md | 6 년 전 | |
pom.xml | 6 년 전 |
Purpose: To demonstrate multi-inheritence design issues
Consider a system in which
NoiseMaker
can makeNoise
All Animal
are NoiseMaker
Horse
are Animal
Dog
are Animal
All Rider
can mount
and dismount
a Rideable
object.
All Vehicle
are NoiseMaker
and Rideable
All FarmVehicle
can harvest
a Produce
Tractor
are FarmVehicle
CropDuster
are FarmVehicle
All Aircraft
can fly
Plane
are Aircraft
which can cruise
Jet
are Aircraft
which can zoom
All Produce
can yield
an Edible
object.
CornStalk
can yield
a EarCorn
TomatoPlant
can yield
a Tomato
All Person
can eat
an Edible
object and makeNoise
.
All Farmer
are Rider
and Person
Froilan
is a Farmer
who has