Private Inheritance Assignment Help

Assignment Help: >> Inheritance - Private Inheritance

Private Inheritance

Within a private derivation,

  • Every public member in the base class is private in the derived class.
  • Every protected member in the base class is private in the derived class
  • Every private member in the base class remains private in the base class and therefore it is visible just in the based class

For eg,

Class baseA

{

public:

};

private:

int x;

protected:

int y;

int z;

class derivedD:private baseA

{

private:

int w;

};

A class derivedD is derived from the base class baseA and the access specifier is private. A data members of the derived class derivedD is

Int x,y,z,w;

The given table displays the access specifier of the data member of the base class in the derived class:

1526_private inheritance.png

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd