Class B { Public: Void b1(); Protected: Void b2(); }; Class A : public B { Public: Void a1(); Protected: Void a2(); }; Class C: public A { Public: Void c1(); }; Void main () { B temp1; A temp2; C temp3; } a) Name all member functions of all classes visible through temp1 in the main function? b) Name all member functions of all classes visible through temp2 in the main function? c) Name all member functions of all classes visible through temp3 in the main function? d) Which class is the parent of class A? e) Which class is the child of class A?
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Class B
{
Public:
Void b1();
Protected:
Void b2();
};
Class A : public B
{
Public:
Void a1();
Protected:
Void a2();
};
Class C: public A
{
Public:
Void c1();
};
Void main ()
{
B temp1; A temp2; C temp3;
}
a) Name all member functions of all classes visible through temp1 in the main function?
b) Name all member functions of all classes visible through temp2 in the main function?
c) Name all member functions of all classes visible through temp3 in the main function?
d) Which class is the parent of class A?
e) Which class is the child of class A?
Trending now
This is a popular solution!
Step by step
Solved in 2 steps