Book a dinner reservation
Solution(In English)
- Find out their time of landing. Store it as variable called “landing time”.
- Find out their place of landing and then store it as variable called “landing spot”.
- If they land in courtenay, then added 20 minutes in their landing time and stored it as “reservation time”. then book a taxi.
- If they land in Smiths field, then add 45 minutes to their landing time and stored it as “reservation time”. then book a loaner car.
- Find out the time that they book for reservation in Atlas Cafe and store it as “available reservation time”.
- Compare available reservation time with each reservation time.
- If the available reservation time is earlier to reservation time. Then move to next available reservation time.
- If the available reservation time is equal to or later than the reservation time. Then book this time
Leave a Reply