CJCoding With Joseph
15free / daySign inCreate account

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

= newline. The output ends with a newline, so print one after the last line.

Hints3 available
Topics
InheritanceClasses
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · 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.