Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Input / Output: Enter Name: Adam Hi Adam, your appointment is confirmed at 2 PM Enter Name: Bob Enter time: 4 Invalid slot, please choose

Input/Output:
Enter Name: Adam
Hi Adam, your appointment is confirmed at 2 PM
Enter Name: Bob
Enter time: 4
Invalid slot, please choose either 1,2 or 3 pm slot
Hi Bob, your appointment is confirmed at 1 PM
Slot Not Available, please choose another slot
Slot Not Available, please choose another slot
Hi John, your appointment is confirmed at 3 PM
1 Bob
2 AdamYour task is to create a doctors' appointment system. Patients are only allowed to book an appointment with the doctor at 1,
2 or 3 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 3pm-
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions

Question

1. What is the difference between exempt and nonexempt jobs?pg 87

Answered: 1 week ago