echo ", and its area is " . $this->_shape->getArea() . ".</p>"; } } $myCircle = new Circle(); $myCircle->setColor("red"); $myCircle->fill(); $myCircle->setRadius(4); $mySquare = new Square(); $mySquare->setColor("green"); $mySquare->makeHollow(); $mySquare->setSideLength(3); $info = new ShapeInfo(); $info->setShape($myCircle); $info->showInfo(); // Displays "The shape's color is red, and its area is 50.2654824574." $info->setShape($mySquare); $info->showInfo(); // Displays "The shape's color is green, and its area is 9." $myRect = new Rectangle(); $myRect->setColor("yellow"); $myRect->fill(); $myRect->setWidth(4); $myRect->setHeight(5); $info->setShape($myRect); $info->showInfo(); // Displays "The shape's color is yellow, and its area is 20." ?> </body> </html>