Question: // MODIFY FOLLOWING CODE using structures. place ss of output. Draw FLOWCHART of system. #include using namespace std; char patients[100]; int doctors[2] = { 0,0

 // MODIFY FOLLOWING CODE using structures. place ss of output. Draw

// MODIFY FOLLOWING CODE using structures. place ss of output. Draw FLOWCHART of system.

#include using namespace std; char patients[100]; int doctors[2] = { 0,0 }; // 0 - represents doctor is availabl 1 -represents doctor is not available int patientsSize = 0; void signup(); void login(); void consult(); void signup() { while (true) { cout > id; id = toupper(id); bool checkIfDuplicate = false; if (isalpha(id)) { for (int i = 0; i > id; if (doctors[id - 1] == 0) { cout > id; bool checkIfIdExists = false; for (int i = 0; i = 4) { cout > choice; if (choice == 1) signup(); else if (choice == 2) login(); else if (choice == 3) break; } }

System Introduction We consider as an example a TeleMedicine Consultation (TMC) service. A patient is being treated over an extended period of time for an illness that requires frequent tests and consultations with a doctor at the hospital to set the right doses of medicine. Since the patient may stay at home and the hospital is at a considerable distance away from the patient's home, the patient has been equipped with the necessary testing equipment at home. The patient can book appointments by contacting TMC reception desk for a consultation session with one of the doctors. The reception desk will assign an available doctor to the requesting patient. Telemedicine sub-systems Signup system A patient wants to get registered to a Telemedicine Consultation (TMC) system to request doctor appointments. The TM system asks the patient to signup. The signup service asks the patient to propose a login ID. If the proposed login ID does not already exist, the patient is notified that you are now registered to the Telemedicine system. If the patient login ID already exists the system asks the patient to choose another ID. The signup service again checks if the ID already exists and so on. There is no limit for re- choosing an ID for signup. After successful registration the patient is asked to Login for doctor appointments. Login system If the patient is already registered to the TMC system, the system asks the patient to login. The login service asks the patient to enter the Login ID. . If the patient enters wrong ID, he is prompted "Wrong ID: re-enter correct ID". The patient can enter wrong ID only three times. The fourth wrong attempt prompts the patient "you are not a registered patient, please signup first". Consultation Service (Reception desk) . If the patient enters correct ID, the system asks the patient to "request a doctor. The TMC service will check if a doctor is available. If it is available the patient is assigned a doctor and prompted "Doctor no. 1 is about to contact you". The prompt can be Doctor no. 2 is about to contact you", if Doctor no. 1 is already assigned to another patient. If a doctor is not available, the patient is prompted "Sorry! No Doctor available" Take care of the following: - Use arrays to register patients. Initialize array with at least two already registered patients. Patient IDs are simple characters (Single characters like 'A' and 'B'). IDs other than alphabets are not allowed. Invalid inputs must be warned. Assume maximum two doctors. Meaning that the TMC system has only two doctors in its resource pool. Use an array initialized with two doctors having IDs 1 and 2. Your design should have at least three user-defined functions named signup, login and consultation Bonus marks (between 2-8) will be given if the system is implemented using the concept of "Structures". Write C++ code of above TMC System

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!