_squareop,qrY{|}RS\r(\rcout$”Theexternalsquare'sareais;\rcout$4*r*r$endl;\r)\rvoidperimeter()\rmnIJperimeter(),U?circleop,qrY{|}[\\r(\rcout$”Theexternalsquare'sperimeteris”;\rcout$8*r$endl;\r)\r)\rvoidmain()\r(\rshape*ptr;IJfD?circle?ptr\rcircleobl(5);0@a}?P`obi,
5\rin_squareob2(5);//0@zY{|}?P`ob2,
5\rex_squareob3(5);0@Y{|}?P`ob5,
5\rptr=&obl;D?ptra}?P`obi\rptr->area();areaqra}RSEvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\rC++5d_P75\rptr->perimeter();perimeter()qra[\\rptr=&ob2;//D?ptrzY{|}?P`obi\rptr->areaO;_areaqrzY{|}RS\rptr->perimeter();perimeter()qrzY{|}[\\rptr=&ob3;_D?ptrY{|}?P`ob3\rptr->areaO;_areaqrY{|}RS\rptr->perimeter();perimeter()qrY{|}[\\r)\r&5.28(+P218)()\r(5d)\rC++5d_P76