| Next | February 2001 | Slide #46 |
Sometimes we define an incomplete class
It holds some generic methods, but not enough to implement a real object
Widget might be an example here
Another example: Shape is a base class for Circle, Rectangle, etc.
Shapes belong to Canvas objects
Shape has position, move, copy methods
Circle and Rectangle inherit these
Calling Shape::draw or Shape::new will fail
Shape is an Abstract Class
There may be a Shape::new with sub new { croak ... }
| Next | ![]() |
Copyright © 2001 M-J. Dominus |