1. Virtual Laboratories
  2. Object Library
  3. Devices
  4. RouletteWheel

RouletteWheel

Description

This class models the standard American roulette wheel. The wheel has 38 slots labeled 0, 00, and 1 to 36. Of the slots labeled 1-26, 18 are red and 18 are green. The roulette wheel object is supplied with an image of a real roulette wheel. The class has methods for getting and setting the score (the number of the slot with the ball), for getting the color of a specified score, for "spinning" the wheel (setting the score to a random value), and for getting and setting a Boolean value that determines whether the ball is drawn. This object is used in the roulette experiment.

RouletteWheel

Class Hierarchy

Code

The text area below gives the code for this object, so that you can browse the constructors, methods, and properties of the object. Of course, this source file is part of devices.zip, which contains all source and resource files for the objects in the devices package.