Write an application that enables you to randomly record water depths for 5 different locations at 0700
Question:
Write an application that enables you to randomly record water depths for 5 different locations at 0700 (7 a.m.), 1200 (12 p.m.), 1700 (5 p.m.), and 2100 (9 p.m.). The locations are Surf City, Solomons, Hilton Head, Miami, and Savannah.
For ease of input, you may want to code the locations (i.e. Surf City = 1, Solomons = 2, etc.) and code the times the same way. If the same location and time are entered more than once, store the last value entered into the array.
After the data is entered, display a table showing the individual data in rows and columns as well as the average depth at each location and the average depth by time period.
I believe the main logic should look something like this:
public static void Main(string[] args)
{
double[,] waterDepth = new Double[6, 5];
string[] location = { "Surf City", "Solomons", "Hilton Head", "Miami", "Savannah" };
string[] time = { "7:00 A.M.", "12:00 P.M.", "5:00 P.M.", "9:00 P.M." };
InitializeArray(waterDepth);
GetWaterDepths(waterDepth, location, time);
FindAvgDepthByLocation(waterDepth);
FindAvgDepthByTime(waterDepth);
DisplayTable(waterDepth, location, time);
Console.ReadKey();
}