C++ LAB

PROGRAM 1 PROGRAM 2 PROGRAM 3 PROGRAM 4 PROGRAM 5 PROGRAM 6 PROGRAM 7

PART- B

PROGRAM 1 PROGRAM 2 PROGRAM 3 PROGRAM 4 PROGRAM 5 PROGRAM 6 PROGRAM 7 PROGRAM 8

old

PROGRAM 8 PROGRAM 9 PROGRAM 10 PROGRAM 11 PROGRAM 12 PROGRAM 13 PROGRAM 14 . . .

write a c++ program to implement multiple inheritance by creating classes- father, mother and son

 
 #include < iostream >

//using namespace std;
 
class Father
{
  public:
    void display1()
    {
        cout <<"\n This is method of Father";
    }
};

class Mother
{
  public:
    void display2()
    {
        cout <<"\nThis is method of Mother";
    }
};

class Son: public Father, public Mother

{
  public:
};

int main()
{
    Son sample;
    sample.display1();   
	sample.display2(); 
   // getch();
    return 0;
}