CJCoding With Joseph
15per day

Multi Level Inheritance

A three-level inheritance chain has been provided:
- Person (base class) with a protected name and getName() function
- Student (derived from Person)
- GraduateStudent (derived from Student)

Your task is to implement the printLevel() function for GraduateStudent. It should print "Graduate Student".

This demonstrates multi-level inheritance: GraduateStudent inherits from Student, which inherits from Person. The getName() function works because it is inherited through the entire chain.

Do NOT include a main function. Your code will be tested automatically.

Expected output:
Carol
Graduate Student

Expected Output:

Carol
Graduate Student
Topics:
Inheritance
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cout, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.