Define a slot machine with three reels that can individually spin()
, and then display()
the current contents of all the reels.
The basic behavior of a single reel is defined in the reel
object below. But the slot machine needs individual reels—objects that delegate to reel
, and which each have a property.
Try to solve this yourself first.
Hints: