I am learning Object-Oriented Programming and I missed the class on inheritance. I am going through some problems in my textbook and I came across a few questions which I don't understand. There is a table given and you have to list all the private, protected, and public members on each Class. If someone could please help me to understand what gets passed to each. If someone could explain what gets passed to Class_B, I might be able to figure out the rest.
TABLE
----------------------------------------------
Base Class Member Access Category
----------------------------------------------
private
protected
public
----------------------------------------------
Derived Class Public Base Class
----------------------------------------------
private
protected
public
----------------------------------------------
Derived Class Private Base Class
----------------------------------------------
private
private
private
-----------------------------------------------
class Class_A
{
private:
int A_private;
protected:
int A_protected;
public:
Class_A(int, int);
void A_Pub_Func();
};
class Class_B : public Class_A
{
private:
int B_private;
protected:
int B_protected;
public:
Class_B(int, int);
void B_Pub_Func();
};
class Class_C : private Class_A
{
private:
int C_private;
protected:
int C_protected;
public:
Class_C(int, int);
void C_Pub_Func();
};
class Class_D : public Class_B
{
private:
int D_private;
protected:
int D_protected;
public:
Class_D(int, int);
void D_Pub_Func();
};
class Class_E : public Class_C
{
private:
int E_private;
protected:
int E_protected;
public:
Class_E(int, int);
void E_Pub_Func();
};