Write a CPP program that manages the reservation of patient for a doctor Here are some details: - The doctor is available on Sun, Mon, Tue and Wed from 10:00AM to 12:00AM he is also available on Thu from 4:00pm to 8:00pm. - Each reservation slot is 1 hour. - If the reservation slot is free, the patent will write his or her name - If the reservation is successful, the patent will receive a reservation number. - The patent can see the available free reservation slots on a given day. - The patent cannot make a reservation in a slot unless it is free. - The patent can cancel a reservation if he/she wrote the reservation number correctly. - The patent can ask about the reservation time if he/she wrote the reservation number correctly. - This program does not end. here are some scenarios: Hello, if you wish to make a reservation, please press 1. If you wish to ask about your reservation, please press 2: 2 please enter your reservation number: 1221 Hello Salem Abed. Your reservation is on Wed at 11:00 am Do you want to cancel it? (Yes/No): No Thank you Hello, if you wish to make a reservation, please press 1. If you wish to ask about your reservation, please press 2: 1 please select a day (1-Sun, 2-Mon, 3-Tue, 4-Wed, 5-Thu): 3 On Tue you have time slots at 10 or 11 or 12 please enter the time: 11 please enter your name: Ali Ahmad Thank you for making the reservation. Your id is 5653 Hello, if you wish to make a reservation, please press 1. If you wish to ask about your reservation, please press 2: 1 please select a day (1-Sun, 2-Mon, 3-Tue, 4-Wed, 5-Thu): 3 On Tue you have time slots at 10 or 12, please enter the time: 11 Sorry, this is not available please enter the time: 12 please enter your name: Ali Ahmad Thank you for making the reservation. Your id is 5653 Hello, if you wish to make a reservation, please press 1. If you wish to ask about your reservation, please press 2: 2 please enter your reservation number: 5653 Hello Ali Ahmad. Your reservation is on Tue at 12:00 am Do you want to cancel it? (Yes/No): Yes Your reservation is cancelled Thank you Hello, if you wish to make a reservation, please press 1. If you wish to ask about your reservation, please press 2: 2 please enter your reservation number: 5653 This number is wrong Thank you Hello, if you wish to make a reservation, please press 1. If you wish to ask about your reservation, please press 2

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter10: Classes And Data Abstraction
Section: Chapter Questions
Problem 19PE
icon
Related questions
Question

why you can't answer this , please try ....

Write a CPP program that manages the reservation of patient for a doctor
Here are some details:
- The doctor is available on Sun, Mon, Tue and Wed from 10:00AM to 12:00AM he is also
available on Thu from 4:00pm to 8:00pm.
- Each reservation slot is 1 hour.
- If the reservation slot is free, the patent will write his or her name
- If the reservation is successful, the patent will receive a reservation number.
- The patent can see the available free reservation slots on a given day.
- The patent cannot make a reservation in a slot unless it is free.
- The patent can cancel a reservation if he/she wrote the reservation number correctly.
- The patent can ask about the reservation time if he/she wrote the reservation number correctly.
- This program does not end.
here are some scenarios:
Hello, if you wish to make a reservation, please press 1. If you wish to ask
about your reservation, please press 2: 2
please enter your reservation number: 1221
Hello Salem Abed.
Your reservation is on Wed at 11:00 am
Do you want to cancel it? (Yes/No): No
Thank you
Hello, if you wish to make a reservation, please press 1. If you wish to ask
about your reservation, please press 2: 1
please select a day (1-Sun, 2-Mon, 3-Tue, 4-Wed, 5-Thu): 3
On Tue you have time slots at 10 or 11 or 12
please enter the time: 11
please enter your name: Ali Ahmad
Thank you for making the reservation. Your id is 5653

Hello, if you wish to make a reservation, please press 1. If you wish to ask
about your reservation, please press 2: 1
please select a day (1-Sun, 2-Mon, 3-Tue, 4-Wed, 5-Thu): 3
On Tue you have time slots at 10 or 12,
please enter the time: 11
Sorry, this is not available
please enter the time: 12
please enter your name: Ali Ahmad
Thank you for making the reservation. Your id is 5653
Hello, if you wish to make a reservation, please press 1. If you wish to ask
about your reservation, please press 2: 2
please enter your reservation number: 5653
Hello Ali Ahmad.
Your reservation is on Tue at 12:00 am
Do you want to cancel it? (Yes/No): Yes
Your reservation is cancelled
Thank you
Hello, if you wish to make a reservation, please press 1. If you wish to ask
about your reservation, please press 2: 2
please enter your reservation number: 5653
This number is wrong
Thank you
Hello, if you wish to make a reservation, please press 1. If you wish to ask
about your reservation, please press 2
....
....
etc.

 

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Bare Bones Programming Language
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning