1. virtual float GetArea() = 0;
virtual float GetPerim() = 0; //两个纯虚函数
2. Rectangle(float width, float length):itsWidth(width), itsLength(length){}
3. float GetArea() {return itsWidth* itsLength;}
float GetPerim() {return 2 * (itsWidth + itsLength);}
1. virtual float GetArea() = 0;
virtual float GetPerim() = 0;
2. Rectangle(float width, float length):itsWidth(width), itsLength(length){}
3. float GetArea() {return itsWidth* itsLength;}
float GetPerim() {return 2 * (itsWidth + itsLength);}