506 B
506 B
Base Class Initialization (#2)
The starter code defines classes describing a dinner place setting:
Plate
, andDinnerPlate
inherit fromPlate
Utensil
, and thenSpoon
,Fork
andKnife
that all inherit fromUtensil
Custom
(as in "a cultural tradition")
Inherit PlaceSetting
from Custom
. Inside PlaceSetting
, create properties
of type Spoon
, Fork
, Knife
and DinnerPlate
, in that order. main()
creates an instance of PlaceSetting
to show the initialization order.