Question: ---------- #include #include using namespace std; class Patient { public: bool ReadDetails(); void Print() const; private: string name; char group; }; bool Patient::ReadDetails() { string

----------
#include
class Patient { public: bool ReadDetails(); void Print() const; private: string name; char group; };
bool Patient::ReadDetails() { string newName; cin >> newName; if (newName == "done") { return false; } else { name = newName; cin >> group; return true; } }
void Patient::Print() const { cout
int main() { unsigned int i; vector
// FILL IN THE MISSING PIECE AND TEST CODE HERE IN C++ (THANK YOU)
for (i = 0; i Use currPatient's ReadDetails() to read each pair of inputs, string name and character group, until "done" is read from input and currPatient's ReadDetails() returns false. If currPatient's ReadDetails() returns true, append currPatient to vector patientList. Ex: If the input is Jen B Aya B Ron A Ava A Taj B done, then the output is: Patient: Jen, Group: B Patient: Aya, Group: B Patient: Ron, Group: A Patient: Ava, Group: A Patient: Taj, Group: B
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
