Write the code with comment and output result
Interface and Polymorphism
Implement a class Quiz that implements the Measurable interface. A quiz has a score and a letter grade (such as B+). Use the implementation of the DataSet class to process a collection of quizzes. Display the average score and the quiz with the highest score (both letter grade and score).
Consider the task of translating a plain text book from Project Gutenberg to HTML. For example, here is the start of the first chapter of Tolstoy's Anna Karenina:
Everything was in confusion in the Oblonskys' house. The wife had discovered that the husband was carrying on an intrigue with a French girl, who had been a governess in their family, and she had announced to her husband that she could not go on living in the same house with him...
The equivalent HTML is:
< h1>Chapter 1 < /h1>
< p>Happy families are all alike; every unhappy family is unhappy in its own way.< /p>
< p>Everything was in confusion in the Oblonskys' house. The wife had discovered that the husband was carrying on an intrigue with a French girl, who had been a governess in their family, and she had announced to her husband that she could not go on living in
the same house with him ...< /p>
The HTML conversion can be carried out in two steps. First, the plain text is assembled into segments, blocks of text of the same kind (heading, paragraph, and so on). Then each segment is converted, by surrounding it with the HTML tags and converting special characters.
Plain Text HTML
" "&1dquo(left) or ” (right)
‘ ' ‘ (left) or’ (right)
-&emdash;
<&1t;
>>
&&
Fetching the text from the breaking and Internet it into segments is a challenging task. Provide an interface and a mock implementation. Combine it with a class that uses the mock implementation to complete the formatting task.