a)Create a Document class to load the text document in memory. For this purpose the constructor of the class is in charge with creating a memory structure representing an array of pointers to string classes, each string class holding the content of one row. The array of pointers should grow by an increment of 10 each time it fills up with document’s rows. The document should be read from a text file, each sentence of the text file is captured in a string object. In the example below the text from the document is represented in abstract by rows of ‘a’, ‘b’, etc. This class should be tracking the size of the array of pointers, the number of rows loaded, and provide an interface getRow(int nr) function to return the content of a particular row (verify for document overflow).
b)Create a Display class that has a Document classs as member. The Constructor of the class will define the display area in terms of offset position from the top-left corner of the DOS window (the 5th row) and the height of the display area (10 rows). The Display class will get the keyboard input and move the DOS prompt based on the four arrows: Up, Down, Left, Right. Once the prompt reaches the top or bottom of the display area, the text is scrolled Down or Up respectively. To display the document’s content, the Display class will call repeatedly the getRow(nr) function The ESC button will terminate the program.