inheritance type
base class access specifier → derived class access specifier
[ accessible in derived class method? | accessible through derived class object? ]
public:
public → public [yes, yes]
protected → protected [yes, no]
private → private [yes, no]
protected:
public → protected [yes, no]
protected → protected [yes, no]
private → private [no, no]
private:
public → private [yes, no]
protected → private [yes, no]
private → private [no, no]
base class access specifier → derived class access specifier
[ accessible in derived class method? | accessible through derived class object? ]
public:
public → public [yes, yes]
protected → protected [yes, no]
private → private [yes, no]
protected:
public → protected [yes, no]
protected → protected [yes, no]
private → private [no, no]
private:
public → private [yes, no]
protected → private [yes, no]
private → private [no, no]
No comments:
Post a Comment