Happy families are all alike


Consider the task of translating a plain text book from Project Gutenberg (https://gutenberg.org) to HTML. For example, here is the start of the first chapter of Tolstoy's Anna Karenina:

Chapter 1

Happy families are all alike; every unhappy family is unhappy in
its own way.

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:

Chapter 1


Happy families are all alike; every unhappy family is unhappy in
its own way.


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 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.

Fetching the text from the Internet and breaking 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 finish the formatting task. Provide an interface and a mock implementation. combine it with a class that uses the mock implementation to finish the formatting task. 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Happy families are all alike
Reference No:- TGS087768

Expected delivery within 24 Hours