For this exercise you are asked to write an application that allows the user to input the coordinates of points on a map. After the user has input all the coordinates they want to input, the program then displays a text-based map, filled with dots (represented by the '.' character), except for the locations the user entered the coordinates of, which are indicated by 'X' characters.
The dimensions of the map is 44 columns by 19 rows. You should use a two-dimensional array to mark the coordinates entered by the user (e.g. bool[,] map = new bool[19,44]).
The program collects input from the user by asking the user to input the X coordinate first, followed by the Y coordinate, followed by 'y' or 'n' to ask the user if there are any more points to be entered.
After the user has indicated (by responding 'n' on the third question) that there are no more points, the program should display the map, ask the user to press enter to exit, then close when the user presses enter.
Here is an example of a typical session (using a map of 10 columns by 5 rows to save space): see image.
Note that:
Your program should detect invalid input and out of range coordinates. When the user enters something other than a number as one of the coordinate inputs, your program should display the message 'Invalid input.' and ask the user again.
Likewise, if the user enters something that is a number but that number is outside the legal range for the map, your program should display the message 'Out of range.' and ask for that coordinate again.
Finally, for the question 'More? (y/n): ', if the user enters anything other than 'y' or 'n', your program should display the message 'Please answer with y or n.' and ask the user again.
Here's another example of a possible session with the program, again with a 10 x 5 map: see image.
Here's some hints specific to this exercise: