Solution (in English):
- Find out if Mary and Louise will be landing in Smits Field or in Courtenay.
- If they are landing in Smits Field, find out the new landing time and store it in a variable called “newLandingTime.”
- Add 45 minutes to newLandingTime and store it in a new variable called arrivalTime.
- Find out the list of available times for a reservation and store them in a variable called availableTimes.
- Compare arrivalTime to teach availableTimes.
- If availableTimes is greater than or equal to arrivalTime, book this time.
- If availableTimes is less than arrivalTime, move on to the next availableTimes.
- Book a loaner car.
- If they are landing in Courtenay, find out the new landing time and store it in a variable called “newLandingTime.”
- Add 20 minutes to newLandingTime and store it in a new variable called arrivalTime.
- Find out the list of available times for a reservation and store them in a variable called availableTimes.
- Compare arrivalTime to teach availableTimes.
- If availableTimes is greater than or equal to arrivalTime, book this time.
- If availableTimes is less than arrivalTime, move on to the next availableTimes.
- Book a taxi.
Solution (flowchart):


Leave a Reply