第六章
gan920hp
这个作者很懒,什么都没留下…
展开
-
第三题
#include using namespace std; class Point {public: Point(float a,float b):x(a),y(b){} ~Point(){cout private: float x; float y; }; class Circle:public Point {public: Circle原创 2015-06-22 18:26:39 · 346 阅读 · 0 评论 -
4
#include using namespace std; //定义抽象基类Shape class Shape {public: virtual double area() const =0; //纯虚函数 }; //定义Circle类 class Circle:public Shape {public: Circle(double r):ra原创 2015-06-22 18:28:05 · 949 阅读 · 0 评论 -
5
#include using namespace std; //定义抽象基类Shape class Shape {public: virtual double area() const =0; //纯虚函数 }; //定义Circle(圆形)类 class Circle:public Shape {publ原创 2015-06-22 18:29:29 · 385 阅读 · 0 评论