Question: - 3. There are classes A, B, C. Class A is base class. Class B is derived class from class A with private derivation mode.

- 3. There are classes A, B, C. Class A is base class. Class B is derived class from class A with private derivation mode. Class C is derived class from class B with public derivation mode. Class A has members in following sections -- private: int a; protected: float ap; public: void printa. Class B has members in following sections - private: char b; protected: float bp; public void getbo. Class C has the members in following sections - private: int c; protected: int cp: public: int assign(int k). (5) Represent diagrammatically what sections and in what classes will be extended as a result of inheritance. (10) Indicate what statements produce an error in the following code. Explain, why? maino { Aa; B b; Cc; c.ap = 10.6; c.printa(); b.printa; c.getbo
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
