Question: Consider the following classes; assume that each is defined in its own file. class Eddie : public Kurt { public: virtual void b ( )
Consider the following classes; assume that each is defined in its own file.
class Eddie : public Kurt
public:
virtual void b
a;
cout E B endl;
virtual void c
cout E C endl;
;
class Kurt
public:
virtual void a
cout K A endl;
c;
virtual void c
cout K C endl;
;
class Chris : public Jerry
public:
virtual void b
a;
cout C B endl;
virtual void c
cout C C endl;
Jerry::c;
virtual void d
cout C D endl;
c;
;
class Jerry : public Kurt
public:
virtual void a
cout J A endl;
virtual void c
cout J C endl;
Kurt::c;
;
Now assume that the following variables are defined:
Kurt var new Jerry;
Jerry var new Chris;
Kurt var new Eddie;
Kurt var new Chris;
Kurt var new Kurt;
In the table below, indicate in the righthand column the output produced by the statement in the lefthand column. If the statement produces more than one line of output, indicate the line breaks with slashes as in x y z to indicate three lines of output with x followed by y followed by z If the statement does not compile, write "COMPILER ERROR". If a statement would crash at runtime or cause unpredictable behavior, write "CRASH".
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
