CJCoding With Joseph
15per day

Override toString in Student

A Person class is provided with a name field. Complete the Student class that extends Person.

Requirements:
1. Student has an additional int grade field.
2. The constructor takes name and grade, calling super(name) for the name.
3. Override toString() to return the format: "<name> - Grade <grade>".

Do NOT write a main method.

Expected Output:

Alice - Grade 10
Topics:
InheritanceClasses
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (sysout, psvm, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.