Next / Previous / Contents / Shipman's homepage

6.2. class Box: Define a rectangle

An instance of this class represents the dimensions of a rectangular area. The constructor:

Box(wide, high)

The arguments are the width and the height, respectively, as instances of class FoDim. The resulting instance has two attributes, .wide and .high, representing the arguments passed to the constructor.