Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

As you know now a days the world is going through the COVID-19 pandemic. People are getting themselves tested to see if they have corona

As you know now a days the world is going through the COVID-19 pandemic. People are getting themselves tested to see if they have corona virus or not. If they have positive result they are being isolated in Quarantine Centers for 14 days and if recovered, they are sent to their homes with safety precautions (same for negative results they are sent to their homes).

In view of this scenario you have to use object oriented programming concepts to manage the patients in quarantine center.

Now let's see the management in center:

There is a Quarantine Center in which Patients are admitted in case they are declared positive with Corona Virus after having a test. To do so, there is a class named Quarantine_Center having data member(s) center_id, location, quantity_of_beds (should be defined by default i.e. 20), no_of_patients and contact number. Person contains person_id (unique), first_name, last_name, gender, age and blood_group. A Patient is inherited from Person class and have its own data member(s) i.e.bed_no (auto assigned should not exceed more then 20, an exception of "Center is Full" should be thrown) and test_result. Test result is generated through Corona_Test class with data members result, date, time and count (total results). Corona_Test is part of Patient class and it will help in generating the result (whether positive or negative). The result is generated randomly using random function. Patients have no particular number defined as many patient wants to come can come, the number of patients will be counted on runtime and that will be the value of no_of_patients in Quarantine_Center class. If the patient have negative result he/she should not be counted in Quarantine_Center class. Patient(s) in center are treated by a Doctor (having name, age, and specialty). The health status of a patient in center is also maintained whether recovering or not. If patient is dead/recovered its count is decremented and the bed gets empty.

Draw the class diagram for the given scenario and then implement the code in C++. (Assume the member functions yourself for each class as much required)

Hint: Some common data members are print_data, search_patient, generate_result or health_status_check etc.

//I need this code in text form as well as code file and also compiled

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

1 Why a dollar today is worth more than a dollar a year from now

Answered: 1 week ago