定義一個shape類,在此基類基礎上派生Rectangele 和circle類,兩者都有getarea()函數計算對象的面積,使用Rectangele 類建立一個派生類square類。請設計各個類並進

#include<iostream> using namespace std; class shape { public:  virtual double getarea()=0;ios }; class Rectangele:public shape { private:  double longth;  double width; public: Rectangele(double a,dou
相關文章
相關標籤/搜索