Problem 3: Find an alternate landing time /location

Solution(in English):

  • Find out how much time their trip delayed and store it as variable called “delayed time.”
  • Find out how long does their trip than expected. Store it as “trip length.”
  • Calculate both delayed time and trip length to find out their original time of landing and store it as “newest landing time.”
  • Find out which time is available for landing . Store it as variable called “availability of time.”
  • Make comparison of newest landing time and the availability of time
  • If availability of time is earlier than the newest landing time , then move to next available time.
  • If availability of time is later than or equal to newest landing time, then book it and land in the Courtenay airpark.
  • If there’s no any availability of time in Courtenay (equal or later than newest landing time), then land in Smiths Airfield.

Solution(in flow chart)