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

 ---------- #include #include using namespace std; class Patient { public: bool

----------

#include #include using namespace std;

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 patientList; Patient currPatient; bool result;

// 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!