38
38
print "\nHere are some properties of the shapes:\n";
39
39
foreach (array($c,$s) as $o) {
40
40
print " ".get_class($o)." $o\n";
41
43
print " area = " . $o->area() . "\n";
42
44
print " perimeter = " . $o->perimeter() . "\n";
45
50
# ----- Delete everything -----
47
52
print "\nGuess I'll clean up now\n";
49
54
# Note: this invokes the virtual destructor
55
58
print Shape::nshapes() . " shapes remain\n";