Question: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MapPlotting { class Program { public static void Main() { // Write your program

 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespaceMapPlotting { class Program { public static void Main() { // Write

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;

namespace MapPlotting { class Program { public static void Main() { // Write your program here // ... Console.WriteLine("Press enter to exit."); Console.ReadLine(); } } }

Using C# 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 d arra (e.g. bool[,] mapnew bool[20,40]) of the map is 40 columns by 20 rows. You should use a two-dimensional y to mark the coor dinates entered by the user 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) Place a marker at which X coordinate? (0-9):;3 Place a marker at which Y coordinate? (0-4): 2 More? (y): y Place a marker at which X coordinate? (0-9): 5 Place a marker at which Y coordinate? (0-4): 1 More? (y): y Place a marker at which X coordinate? (0-9): e Place a marker at which Y coordinate? (0-4): e More? (y): n Press enter to exit. Note that .The coordinates are base 0 that is, the lowest legal value for a coordinate is 0 and the highest legal value is the respective dimension of the map minus 1. Therefore, for the above example with a 10 x 5 map, the valid X values are 0-9 and the valid Y values are 0-4 .The coordinates 0, 0 refer to the top left of the map

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!