![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
inheritance
文章平均质量分 73
ALDNOAH_ZERO
刷题与作业题为主
展开
-
1000. About Polymorphic
Description下面是不完整的继承类定义,需要补充或增加完整的构造函数、析构函数、void fun()class A{ void g() { fun(); }};此外该类需要定义函数 fun() ,实现输出:Call class A's funclass B{};继承来自于基类A,同时补充完整类B原创 2015-05-29 14:34:43 · 482 阅读 · 0 评论 -
1002.The Triangle
Time Limit: 1sec Memory Limit:256MBDescriptionDesign a class named Triangle that extends GeometricObject class.The class contains:Three double data fields named side1, side2, and side3原创 2015-05-22 18:06:23 · 1365 阅读 · 0 评论 -
1009.Dynamic_cast
Time Limit: 1sec Memory Limit:256MBDescription Three classes A, B and C are shown below: class A {public: virtual ~A() {};};class B: public A {}; class C: public B {};原创 2015-05-22 22:48:43 · 611 阅读 · 0 评论 -
1002. Cat
Time Limit: 1sec Memory Limit:256MBDescriptionDescription实现如下animal类的子类cat类,使得调用示例可得到对应输出。提交时只需要提交cat类实现,不要提交animal类和main函数。class animal{public:animal(int age) : age(age) {} int原创 2015-06-12 16:29:34 · 751 阅读 · 0 评论