A method that outputs the name and list of all patients - a


Question: Create a class named Doctor that has three member variables:

1. Name - A string that stores the name of the doctor

2. numPatients - An Integer that tracks how many patients the doctor must treat

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

Write suitable constructor(s), mutator, and accessor methods for the class along with the given:

A method that inputs all values from the user, including the list of patient names. Note this method has to support input for an arbitrary number of patients.

A method that outputs the name and list of all patients

A method that resets the number of patients 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.

Prepare a main method that tests (i.e, unit testing) all of your functions.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: A method that outputs the name and list of all patients - a
Reference No:- TGS0961322

Expected delivery within 24 Hours