Application Kata “More”

Write a console application to display the content of a text file in a pagewise manner. It should be called like this:

Upon start the first page is shown (page length = 20 lines) and the application waits for the user to press a key to show the next page. Pressing [Esc] exits the application. Example:

After pressing for example the space bar this would be displayed:


Variation #1

Allow for a user defined page length, e.g.

Variation #2

Show the current page number and the total number of pages at the top of each page, e.g.