Teachpacks for How to Design Classes

A Colors Library (HtDC)


Add


  import colors.*
at the top of your Definitions Window to import this library.

This draw package provides classes for representing colors:


                              +--------+
                              | IColor |
                              +--------+
                                  |
                                 / \
                                 ---
                                  |
             --------------------------------------------------
             |          |         |         |         |       |
         +-------+  +-------+ +-------+ +-------+ +-------+  +-------+ 
         | Blue  |  | Green | | Red   | | White | | Yellow|  | Black | 
         +-------+  +-------+ +-------+ +-------+ +-------+  +-------+ 

The IColor class is abstract. Its variants (subclasses) are created with no arguments.