Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Create a class named Doctor that has three member variables: name A string that stores the name of the doctor numPatients An integer that

C++

Create a class named Doctor that has three member variables:

name A string that stores the name of the doctor

numPatients An integer that tracks how many patients the doctor must treat

patientList A dynamic array of strings used to store the patient names

Write appropriate constructor(s), mutator, and accessor methods for the class along with the following: A method that inputs all values from the user, including the list of patient names. Note that this method has to

support input for an arbitrary number of patient. A method that outputs the name and list of all patients. A method that resets the number of patient to 0 and the patientList to an empty list. An overloaded assignment operator that correctly makes a new copy of the list of patients. A destructor that releases all memory that has been allocated.

Write a main function that tests (i.e., unit testing) all of your functions. C++!!!

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

Database Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago