MENU
Question -

Answer the question (i) to (iv) based on the following :

class Interior
{
int OrderId;┬а
char Address[20];┬а
protected:
float Advance;┬а
public:
Interior();
void Book();┬а
void View();
};
class Painting : public Interior
{┬а
int WallArea, ColorCode;┬а
protected:
char Type;┬а
public:
Painting();┬а
void PBook();┬а
void PView();
};
class Billing : public Painting
{
float Charges;┬а
void Calculate();┬а
public:
Billing();┬а
void Bill();
void BillPrint();
};
(i) Which type of Inheritance of the following is illustrated in the above example ?
тАФ Single Level Inheritance┬а
тАФ Multi Level Inheritance┬а
тАФ Multiple Inheritance



Answer -

Mutli Level Inheritance
(ii)┬а ┬а Write the names of all the data members, which are directly accessible from the member functions of class painting.
Wall Area, Color Code, Type, Advance
Note :
тАв┬а ┬а No marks to be awaarded for any partial or additional answer(s)
(iii)┬а ┬а Write the names of all the member functions, which are directly accessible from an object of class Billing. Bill(), BillPrint(), PBook(), PViewQ, Book(), View()
Note : No marks to be awarded for any partial/ additional answer(s)
тАв Constructors can be ignored

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
Any questions? Ask us!
×