Graphics Programs Reference
In-Depth Information
Gold Challenge: Another Class
Create a subclass of
BNRItem
named
BNRContainer
. A
BNRContainer
should have
an array of
subitems
that contains instances of
BNRItem
. Printing the description of a
BNRContainer
should show you the name of the container, its value in dollars (a sum of
all items in the container plus the value of the container itself), and a list of every
BNRItem
it contains. A properly-written
BNRContainer
can contain instances of
BNRContainer
. It can also report back its full value and every contained item properly.