What is the input and output?
Inheritance and polymorphism exercise
Write the complete class A from the known code and input/output information below. Do not write constructors for class A. In addition, it is required to complete the parameter part of the function Call.
++
1 #include
2 #include < stdio. h>
3 using namespace std;
4
5 class A{
6
7
8
9
10
11
12
13
14
15
16
1 7 } ;
18
19 class B:public A {
20 public:
21 void Do(){cout < <" B::Do"< < endl; }
22 } ;
23
24 class C:public B {
25 public:
26 void Do(){cout < <" C::Do"< < endl; }
27 void Fun(){cout < <" C::Fun" < < end1; }
28 } ; < br / > 29 void Call(30) < br / > < br / > {31 < br / > 32 p - & gt; FunOI
33 p-> Do(); 34} < br / > < br / > 35 int main() 36 {< br / > < br / > 37 Call(new AO);
38 Call(new CO);
39 return 0;
40 }
0 Answer
这家伙很懒,什么都没留下...