//11/26 作业(5)
#include
using namespace std;
const double PI=3.14159;
class Shape
{
protected:
int x,y;
public:
//void set(int x1,int y1=0){x=x1; y=y1;}
//Shape(int x1,int y1=0){x=x1; y=y1;}
virtual double GetArea()=0;
virtual double GetPerim()=0;
};
class Rectangle:public Shape
{
public:
Rectangle(int x1,int y1=0){x=x1; y=y1;}
double GetArea(){cout<<"The area of rectangle is: "<
//11/26 作业(5)
最新推荐文章于 2023-12-17 22:47:21 发布
