Question: Input / Output: Enter Name: Adam Hi Adam, your appointment is confirmed at 2 PM Enter Name: Bob Enter time: 4 Invalid slot, please choose
InputOutput:
Enter Name: Adam
Hi Adam, your appointment is confirmed at PM
Enter Name: Bob
Enter time:
Invalid slot, please choose either or pm slot
Hi Bob, your appointment is confirmed at PM
Slot Not Available, please choose another slot
Slot Not Available, please choose another slot
Hi John, your appointment is confirmed at PM
Bob
AdamYour task is to create a doctors' appointment system. Patients are only allowed to book an appointment with the doctor at
or PM Use an appropriate collection to store patients' preferred time slot and their name. Write a loop that iterates as
long as there is an empty space in the doctors' schedule.
Allow the patients to enter their preferred time and name. In case the time slot is available, put the time and patients' name
into your chosen collection and print Hi
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
