Skip to content

Commit

Permalink
Update Program.cs
Browse files Browse the repository at this point in the history
clarified instructions in nested loop
  • Loading branch information
amoriss authored Nov 21, 2023
1 parent f924680 commit af09689
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions LoggingKata/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,34 @@ static void Main(string[] args)
var locations = lines.Select(parser.Parse).ToArray();


// Complete Parse method in TacoParser class and then START BELOW ----------
// Complete the Parse method in TacoParser class first and then START BELOW ----------

// TODO: Create two `ITrackable` variables with initial values of `null`. These will be used to store your two Taco Bells that are the farthest from each other.
// TODO: Create two `ITrackable` variables with initial values of `null`.
// These will be used to store your two Taco Bells that are the farthest from each other.

// TODO: Create a `double` variable to store the distance

// TODO: Add the Geolocation library to enable location comparisons: using GeoCoordinatePortable;
// Look up what methods you have access to within this library
// Look up what methods you have access to within this library.

// NESTED LOOPS SECTION----------------------------

// FIRST FOR LOOP -
// TO DO: Make a loop to iterate through your locations collection.
// This will allow you to grab each location as the "origin" location (naming suggestion for variable: `locA`)
// FIRST FOR LOOP -
// TODO: Create a loop to go through each item in your collection of locations.
// This loop will let you select one location at a time to act as the "starting point" or "origin" location.
// Naming suggestion for variable: `locA`

// TODO: Create a new Coordinate called `corA` with your locA's latitude and longitude
// TODO: Once you have locA, create a new Coordinate object called `corA` with your locA's latitude and longitude.

// SECOND FOR LOOP -
// TODO: Now, create another loop to iterate through locations within the scope of your first loop, so you can grab the "destination" location (naming suggestion for variable: `locB`)
// SECOND FOR LOOP -
// TODO: Now, Inside the scope of your first loop, create another loop to iterate through locations again.
// This allows you to pick a "destination" location for each "origin" location from the first loop.
// Naming suggestion for variable: `locB`

// TODO: Create a new Coordinate with your locB's latitude and longitude
// TODO: Once you have locB, create a new Coordinate object called `corB` with your locB's latitude and longitude.

// TODO: Now, still being inside the scope of the second for loop, compare the two locations using `.GetDistanceTo()` method, which returns a double
// If the distance is greater than the currently saved distance, update the distance variable and the two `ITrackable` variables you set above
// TODO: Now, still being inside the scope of the second for loop, compare the two locations using `.GetDistanceTo()` method, which returns a double.
// If the distance is greater than the currently saved distance, update the distance variable and the two `ITrackable` variables you set above.

// NESTED LOOPS SECTION COMPLETE ---------------------

Expand Down

0 comments on commit af09689

Please sign in to comment.