home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_08_02 / 8n02045a < prev    next >
Text File  |  1990-03-01  |  3KB  |  87 lines

  1.  
  2.  
  3. *****Listing 1*****
  4.  
  5.  
  6. Class Graphical Object
  7.     Graphical Object is an abstract class.  There will never
  8.       be any instances of this class.  Classes Circle and
  9.       Square are subclasses of this class.
  10.     Graphical Object data:
  11.         y position
  12.         x position
  13.     Graphical Object methods:
  14.         INITIALIZE
  15.             Starting y position
  16.             Starting x position
  17.         DRAW
  18.             Only implemented by subclasses
  19.         MOVE
  20.             Arguments:
  21.                 Increment in the y direction
  22.                 Increment in the x direction
  23.             Send the draw black message to the object (erase
  24.               the object).
  25.             Modify the x and y position of the object per
  26.               the arguments passed to the MOVE method.
  27.             Send the draw white message to the object.
  28.  
  29. Class Circle
  30.     Circle is a subclass of class Graphical Object.
  31.     Circle data (in addition to Graphical Object data):
  32.         radius of the circle
  33.     Circle methods:
  34.         INITIALIZE
  35.             Arguments:
  36.                 Starting y position
  37.                 Starting x position
  38.                 Radius
  39.             Send the INITIALIZE message to class Graphical
  40.               Object
  41.             Store the size in the Circle data.
  42.             Send the DRAW message to the Circle.
  43.         DRAW
  44.             Argument:
  45.                 Color of the circle to be drawn.
  46.             Draw the circle on the screen.
  47.         MOVE
  48.             Inherited from the class Graphical Object.
  49.  
  50. Class Square
  51.     Square is a subclass of class Graphical Object.
  52.     Square data:
  53.         the length of a side of the square
  54.     Square methods:
  55.         INITIALIZE
  56.             Arguments:
  57.                 Starting y position
  58.                 Starting x position
  59.                 Radius
  60.             Send the INITIALIZE message to class Graphical
  61.               Object
  62.             Store the size in the Square data.
  63.             Send the DRAW message to the Square.
  64.         DRAW
  65.             Argument:
  66.                 Color of the square to be drawn.
  67.             Draw the square on the screen.
  68.         MOVE
  69.             Inherited from the class Graphical Object.
  70.  
  71. Class Double_circle
  72.     Class Double_circle is a subclass of class Circle.
  73.     Double_circle data:
  74.         Same a for a Circle.
  75.     Double_circle methods:
  76.         INITIALIZE
  77.             Inherited from class Circle.
  78.         DRAW
  79.             Argument:
  80.                 Color of the Double_circle to be drawn.
  81.             Draw a circle on the screen.
  82.             Draw a slightly smaller concentric circle on the
  83.               screen.
  84.         MOVE
  85.             Inherited from class Circle.
  86.  
  87.