Question: Consider the person_interface and system_user_interface classes described in Example C 10.62. If student is derived from person_interface and system_ user_interface, explain what happens in the

Consider the person_interface and system_user_interface classes described in Example C 10.62. If student is derived from person_interface and system_ user_interface, explain what happens in the following method call:

student s;
person *p = &s;
...
p->print_stats();

You may wish to use a diagram of the representation of a student object to illustrate the method lookups that occur and the views that are computed. You may assume an implementation akin to that of Figure C 10.10, without shared inheritance.

Step by Step Solution

3.41 Rating (164 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

If we assign a reference to our student object into vari... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Language Pragmatics Questions!