bobterwillinger
12/12/2007 8:39:00 PM
Hi,
An old ruby quiz (#24) deals with a game of poker, and there's a
"Deck" class in a couple of solutions. These classes have an array of
Card objects.
Similarly, in an example in the Prag porgrammers guide, a SongList
class has an array, which is a list of Song objects.
To me, it would seem more natural if "Deck" and "SongList" were
subclasses of Array, and added Cards/Songs to self. Does anybody have
an explanation or a good link talking about the merits of these
different approaches?
thanks,
bob