[C++] Simple inheritance question
- by xbonez
I was going over some sample questions for an upcoming test, and this question is totally confusing me. Any help would be appreciated.
Consider the following code:
class GraduateStudent : public Student
{
...
};
If the word "public" is omitted, GraduateStudent uses private inheritance, which means which of the following?
GraduateStudent objects may not use methods of Student.
GraduateStudent does not have access to private objects of Student.
No method of GraduateStudent may call a method of Student.
Only const methods of GraduateStudent can call methods of Student.