Introduction to OOP | Chapter 21: Software Frameworks : | next | previous | audio | real | text |
GraphicalObject = object (* data fields *) link : GraphicalObject; region : Rect; (* initialization function *) procedure setRegion (left, top, right, bottom : integer); (* operations that graphical objects perform *) procedure draw; procedure update; function intersect (anObj : GraphicalObject) : boolean; procedure hitBy (anObj : GraphicalObject); end;