Problem 2: Decide if a Courtenay landing is safe

Solution in English: 

  • Calculate leaveTime plus tripLength. Store it in a variable called ā€˜earliestLandingTime’
  • Find out what ā€˜windSpeed’ is happening at ā€˜earliestLandingTime’
  • Is ā€˜windSpeeed’ less than or greater than 12knots?
  • If ā€˜windSpeed’ is less than 12knots Mary can land at Courtenay
  • If ā€˜windSpeed’ is equal to or greater than 12knots Mary must contact the Marshall 

Problem 3: Find an alternate landing time/location

Solution in English:

  • Calculate the ā€˜newLandingTime’ by adding the time delayed to the previous ā€˜earliestLandingTime’
  • Find out the new available landing times. Store it in a variable called ā€˜newAvailableTimes’ 
  • Compare newLandingTime to each newAvailableTimeĀ 
  • If newAvailableTime is earlier than newLandingTime, move to the next newAvailableTimeĀ 
  • If newAvailableTime is equal to or later than newLandingTime, book this timeĀ Ā 
  • If there are no newLandingTime’s available – Mary must land at Smits

Problem 4: Book a dinner reservation 

  • Determine if Mary & Loiuse are landing at Smits or at Courtenay
  • If they are landing at Smits add 45 minutes to the newLandingTime to determine the reservationTime
  • Then Loiuse must contact the Marshall for the loaner car
  • If they are landing at Courtenay, they must add 20 minutes to the newLandingTime to determine the reservationTime
  • Then Loiuse must call a taxi