02D-2016
CBSE12D-2016
Problem Statement - Inheritance Type, Data and Function Accessibility Identification
Answer the questions (i) to (iv) based on the following:
class ITEM { int Id; char IName[20]; protected: float Qty; public: ITEM(); void Enter(); void View(); }; class TRADER { int DCode; protected: char Manager[20]; public: TRADER(); void Enter(); void View(); }; class SALEPOINT : public ITEM,private TRADER { char Name[20],Location[20]; public : SALEPOINT(); void EnterAll(); void ViewAll(); };
(i) Which type of Inheritance out of the following is illustrated in the above example?
-Single Level Inheritance
-Multi Level Inheritance
-Multiple Inheritance
(ii) Write the names of all the data members, which are directly accessible from the member functions of class SALEPOINT.
(iii) Write the names of all the member functions, which are directly accessible by an object of class SALEPOINT.
(iv) What will be the order of execution of the constructors, when an object of class SALEPOINT is declared?
Solution
CSKC| Created: 1-Jan-2019 | Updated: 25-Apr-2019|CBSE12A-2016