Build on the Parent's toString
easyQuestion 514Course already has a toString() that returns text such as Course MATH101. OnlineCourse extends it and adds a platform. Instead of rebuilding the parent's text, the override asks the parent for it with super.toString() and adds its own part to the end. The code field is private in Course, so reusing the parent's method is also the only way to get that text.
Requirements:
1. toString() in OnlineCourse returns the parent's text, then the word on with one space on each side, then the platform.
2. Get the first part from super.toString().
The Course class is provided. Do not change it.
Do NOT write a main method.
Expected output
Course MATH101 Course JAVA200 on Zoom
= newline. The output ends with a newline, so print one after the last line.
Hints3 available
Sign in to use hintsTopics
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.