The superclass Student contains: a constructor that accepts a String corresponding to the name of the school the student attends a toString method that returns ‘student at X’ where X is the name of the school the student attends. Write a class definition for the subclass HighSchoolStudent containing: a constructor accepting a String which is used as a parameter to the superclass constructor a toString method that returns ‘high school student at X’. This method must use the toString method of its superclass.

The superclass Student contains: a constructor that accepts a String corresponding to the name of the school the student attends a toString method that returns ‘student at X’ where X is the name of the school the student attends.  Write a class definition for the subclass HighSchoolStudent containing: a constructor accepting a String which is used as a parameter to the superclass constructor a toString method that returns ‘high school student at X’. This method must use the toString method of its superclass.

LANGUAGE: JAVA

CHALLENGE:

The superclass Student contains:
a constructor that accepts a String corresponding to the name of the school the student attends
a toString method that returns ‘student at X’ where X is the name of the school the student attends.

Write a class definition for the subclass HighSchoolStudent containing:
a constructor accepting a String which is used as a parameter to the superclass constructor
a toString method that returns ‘high school student at X’. This method must use the toString method of its superclass.

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days – Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level