Create a class to maintain a Doctor. A doctor has a name that must be stored in the Doctor class. A doctor can only treat 3 patients but could treat fewer than 3. The information for each paticnt should be encapsulated in a Patient class and should include the patient's last name and up to 5 cholesterol readings for the paticnt. Note that less than 5 cholcsterol readings may sometimes be stored. Your Doctor class should support operations to add a patient record to the end of his/her list of assigned patients (i.e., use a vector to store Patient objects in the Doctor class), and to list all patient records (name and associated cholesterol readings). Your Patient class should include operations to allow entry of the patient's last name and up to 5 cholesterol readings, and to return the name and cholesterol readings for that patient. You should write a main program that creates a single Doctor and presents a menu to uscrs that allows them to sclect either Add (A), or List (L), or Quit (Q). Add should allow the user to enter a patient record (name and cholesterol readings) and add it to the end of the doctor's list of patients. List should list all paticnt records currently in the doctor's list. Remember that a patient record includes the patient's name as well as his/her cholesterol readings. You should be able to add and list repeatedly, until you select Q to quit. Use good coding style and principles for all code and input/output formatting. All data in a class must be private. Put cach class declaration in its own header file and its implementation in a separate .cpp file. How to approach this lab: 1. In main(): a. Prompt the user to enter a name for a doctor. b. Create an object of the Doctor class, passing in the name of the doctor as an argument to the constructor of the Doctor class. c. Create a menu with "cout" statements. d. Create a switch statement that contains the cases that the user could enter. c. For the Add paticnts casc, prompt the user to enter a name for the patient if the number of paticnts alrcady existing is less than 3. 1. Using the Doctor object, call the function in the Doctor class to add a patient, passing in the name of the patient that the user entered. f. For the List Patients case, call the function that prints patient records, again by using the Doctor object to call the function in the Doctor class.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Can i get help writing this in c++
07:12 MM b P O
Create a class to maintain a Doctor. A doctor has a name that
must be stored in the Doctor class. A doctor can only treat 3
patients but could treat fewer than 3. The information for each
patient should be encapsulated in a Patient class and should
include the patient's last name and up to 5 cholesterol readings
for the patient. Note that less than 5 cholcsterol rcadings may
sometimes be stored. Your Doctor class should support
operations to add a patient record to the end of his/her list of
assigned patients (i.e., use a vector to store Patient objects in the
Doctor class), and to list all patient records (name and associated
cholesterol readings). Your Patient class should include
operations to allow entry of the patient's last name and up to 5
cholesterol readings, and to return the name and cholesterol
readings for that patient.
You should write a main program that creates a single Doctor
and presents a menu to uscrs that allows them to select either
Add (A), or List (L), or Quit (Q). Add should allow the user to
enter a patient record (name and cholesterol readings) and add it
to the end of the doctor's list of patients. List should list all
patient records currently in the doctor's list. Remember that a
patient record includes the patient's name as well as his/her
cholesterol readings. You should be able to add and list
repeatedly, until you select Q to quit.
Use good coding style and principles for all code and
input/output formatting. All data in a class must be private. Put
cach class declaration in its own header file and its
implementation in a separate .cpp file.
How to approach this lab:
1. In main():
a. Prompt the user to enter a name for a doctor.
b. Create an object of the Doctor class, passing in the
name of the doctor as an argument to the constructor of
the Doctor class.
c. Create a menu with "cout" statements.
d. Create a switch statement that contains the cases that
the user could enter.
c. For the Add patients case, prompt the user to enter a
name for the paticnt if the number of paticnts alrcady
existing is less than 3.
1. Using the Doctor object, call the function in the
Doctor class to add a patient, passing in the name
of the patient that the user entered.
f. For the List Patients case, call the function that prints
patient records, again by using the Doctor object to call
the function in the Doctor class.
Transcribed Image Text:07:12 MM b P O Create a class to maintain a Doctor. A doctor has a name that must be stored in the Doctor class. A doctor can only treat 3 patients but could treat fewer than 3. The information for each patient should be encapsulated in a Patient class and should include the patient's last name and up to 5 cholesterol readings for the patient. Note that less than 5 cholcsterol rcadings may sometimes be stored. Your Doctor class should support operations to add a patient record to the end of his/her list of assigned patients (i.e., use a vector to store Patient objects in the Doctor class), and to list all patient records (name and associated cholesterol readings). Your Patient class should include operations to allow entry of the patient's last name and up to 5 cholesterol readings, and to return the name and cholesterol readings for that patient. You should write a main program that creates a single Doctor and presents a menu to uscrs that allows them to select either Add (A), or List (L), or Quit (Q). Add should allow the user to enter a patient record (name and cholesterol readings) and add it to the end of the doctor's list of patients. List should list all patient records currently in the doctor's list. Remember that a patient record includes the patient's name as well as his/her cholesterol readings. You should be able to add and list repeatedly, until you select Q to quit. Use good coding style and principles for all code and input/output formatting. All data in a class must be private. Put cach class declaration in its own header file and its implementation in a separate .cpp file. How to approach this lab: 1. In main(): a. Prompt the user to enter a name for a doctor. b. Create an object of the Doctor class, passing in the name of the doctor as an argument to the constructor of the Doctor class. c. Create a menu with "cout" statements. d. Create a switch statement that contains the cases that the user could enter. c. For the Add patients case, prompt the user to enter a name for the paticnt if the number of paticnts alrcady existing is less than 3. 1. Using the Doctor object, call the function in the Doctor class to add a patient, passing in the name of the patient that the user entered. f. For the List Patients case, call the function that prints patient records, again by using the Doctor object to call the function in the Doctor class.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY