1B-4

Solution (in English):

  • Louise needs to find out where Mary is landing. Store as variable “Landing location”.
  • Louise needs to find out the landing time. Store as variable “Landing time”.
  • Compare Landing time and Landing Location.
  • If Landing in Courtenay, she must book a Taxi.
  • If landing in Smits Field, must book Loaner car.
  • Then, she needs to find out the available Reservation times. Store as variable “Res time”.
  • Calculate landing time in Courtenay and add 20 min. Store as variable “Court land”.
  • Calculate landing time in Smits Field and add 45 min. Store as variable “Smits land”.
  • Compare Courtenay landing time to available reservation times.
  • Compare Smits Field landing time to available reservation times.
  • If available reservation time is earlier, then move to next available time.
  • If available reservation time is equal to or later than, Book time!

Solution (Flowchart):