Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Suppose class D is derived from class B, and class B has a public member functio

ID: 3790166 • Letter: S

Question

Suppose class D is derived from class B, and class B has a public member function whose declaration is void f0: Suppose class D has its version of the function, void f0 Hero is a function definition and an invocation, vold g(B & b) g(d Object); Suppose this is embedded in an otherwise correct and complete program Which version of f0 will be called? TNs is illegal. You can't pass a D object argument for a B reference parameter B::f0 C D::f0 Suppose class D is derived from class B. and class B has a public member function whose declaration is virtual vad 10;. Suppose class D has its version of the function, void f0 Here is a pointer definition and an access to a member function. B* bPtr = new D; bPtr rightarrow f0; Suppose this is embedded m an otherwise correct and complete program Which version of f0 will be called? D::f0 B::f0 Tine is illegal. You can't assign a D object to a variable of type pointer to B

Explanation / Answer

Question 6:

Suppose this is embedded in an otherwise correct and complete program. Which version of

f() will be called?

B::f()

Question 7

Suppose this is embedded in an otherwise correct and complete program. Which version of

f() will be called?

D::f()