Problem 4: Book a dinner reservation
While Mary is figuring out which airfield to land in, Louise needs to book a reservation at the Atlas Cafe. She was given a list of open times for the reservation. Based on the place they land, she needs to add 20 minutes (Courtenay) or 45 minutes (Smits Field) to their landing time to determine the reservation time. She also needs to book either a taxi (Courtenay) or the airfield loaner car (Smits Field). Write an algorithm that will take the necessary outputs from Problem 3 and determine which reservation time and mode of transportation she needs to book. (You do not need to duplicate 3, just start 4 as if adding on to 3)
Solution (English)
- Would need to ârecordâ (put into memory) result of Problem number 3, create a var âfieldArrivalâ
- If result was NO (Smits Field), store âfalseâ in var âfieldArrivalâ
- If result was YES (Courtenay), store âtrue in var âfieldArrivalâ
- If value is âtrueâ, var âtimeAddâ equals â20â & var âtravelVehicleâ equals âTaxiâ
- If value is âfalseâ, var âtimeAddâ equals â45â & var âtravelVehicleâ equals âLoaner Carâ
- Output (Add âtimeAddâ minutes for reservation and call a âtravelVehicleâ for pick-up.)
mwilson
That works too.
Here is my version: https://docs.google.com/document/d/1Mv4ZhDj3SjXL3M5hE1gY2XjY9Kb_1EUrU0-dg3abN14/edit?usp=sharing