0204

Problem 4 (continuation of Problem 3): 0204

What time to reserve Atlas Cafe for and whether to book a taxi or a loaner car:

Algorithm in English (just portion added to end of Problem 3 – program continues to run):

  • If output from Problem 3 is Land at Smits Field:
  • Input arrivalTimeSmitsField
  • Calculate reservationTimeAtlasCafeSmitsLanding = arrivalTimeSmitsField + 45 minutes
  • Output: reservationTimeAtlasCafeSmitsLanding (as clock time)
  • Output: (println) “book loaner car”
  • Stop Program

OR

  • If output from Problem 3 is Land at Courtenay:
  • Input arrivalTimeCourtenay
  • Calculate reservationTimeAtlasCafeCourtenayLanding = arrivalTimeCourtenay + 20 minutes
  • Output: reservationTimeAtlasCafeCourtenayLanding  (as clock time)
  • Output: (println) “book taxi”
  • Stop Program

Algorithm as Flowchart (Adding Problem 4 info to Problem 3’s Flowchart):

← Previous Post

Next Post →

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *