Finish the Concrete Method of an Abstract Class
easyQuestion 541Report is an abstract class: every kind of report supplies its own body(), and the finished method render() wraps that body in a heading. A concrete method may call an abstract one, because the object that runs it always belongs to a subclass. Complete render().
Requirements:
1. render() returns two lines in one string, joined by \n: the heading, then the text that body() returns.
2. The heading is the title with == in front of it and == after it, so the title Sales gives == Sales ==.
3. When body() returns an empty string, the second line is (nothing to report) instead.
4. Do not add a line break after the second line.
The tests bring their own subclasses of Report. One returns a single line of text from body() and another may return an empty string. Do not change the constructor, getTitle() or the body() declaration.
Do NOT write a main method.
Expected output
== Sales == Units sold: 42
= newline. The output ends with a newline, so print one after the last line.
Your output
Run your code to see the output here...