This question includes detailed explanations, sketches of the design and solution requirements, and several possible scenarios and user’s entries to ensures that students have a complete understanding of the design problemC++ Programming

Computer-Aided Engineering Coursework 4 – Question 2 [14 Marks]

Note: This question includes detailed explanations, sketches of the design and solution requirements, and several possible scenarios and user entries to ensures that students have a complete understanding of the design problem. This explains the need to include many pages. However, the code of the solution is within a reasonable range of difficulty.

Assume that you are working for a company that was given a task to develop a code for COVID- 19 Infection Tracker. The program will be designed to track the chain of COVID-19 infection. For instance, consider Figure 1, which was created by Hospital ABC based on a small sample of the Malaysian population on a certain day.

Figure 1 was created based on a certain scenario, where there are two infected persons (A and

  1. E) who arrived on that certain day in Malaysia. Both of them were tested positive for COVID-19 after going to the hospital to check, since they had several symptoms.

The hospital started tracking the previous movements of these persons on that day. It was found that Person A was in contact with three persons (B, C, and D), and Person E was in contact with five persons (F, G, H, I, and J) after arriving. Then, it was decided that anyone who was in contact with either Person A or B should be categorized as a “1st-degree infection possibility” category. Later, the movements of each person of the 1st-degree infection possibility category were investigated. It was found that only Person I was in contact with other 3 persons (K, L, and M). Thus, these persons were characterized as a “2nd-degree infection possibility” category, since they were in contact with an unconfirmed infected person based on that, the hospital wants to create a system that tracks and stores the conditions of each person that was infected or has a possibility of being infected, as shown in Figure 2 Based on

Figure 2, the hospital wants to create two datasets of the two confirmed patients. These two datasets will include data of the patients and the persons who were in contact with them. Each dataset should include the name, IC/Passport, age, gender, and health condition of everyone that is related to that data. This will allow the hospital to track the infection process and order these persons to be quarantined in their houses or the hospital.

After seven days, the hospital found that some of these persons started experiencing COVID-19 symptoms, while others seemed to be totally healthy. This change can be represented by modifying the previous population sample in Figure 1 to be as follows:

From Figure 3, it can be seen that Persons B, G, and I were infected, while Persons C, D, F, H, and J were not infected. Thus, the hospital wants to update the previous data shown in Figure 2,

accordingly. It should be noted that the data of the non-infected persons will be kept in the datasets for future analysis, as shown in Figure 4.

Figure 4. Patients’ datasets after seven days from discovering the infection.

From Figure 4, it can be noted that a new dataset of each newly confirmed case will be created automatically. This dataset will also include the data of the persons contacted by that infected person. In addition, it can be noted that the category of Persons K, L, and M has changed to 1st-degree infection possibility, since the person that they contacted (Person I) is now confirmed to be infected.

After another seven days (fourteen days since the first infection), none of the healthy persons showed any symptoms. In addition, Persons K and L did not show any symptoms, while Person M has been found to be infected. Thus, Figures 3 and 4 have been updated, as shown in Figures 5 and 6, respectively.

It should be noted that the process of creating a new dataset of any confirmed person will continue, as in the case of Persons K, L, and M. In addition, the health condition of any person should be updated in all the datasets, as in the case of Persons K, L, and M. Moreover, it should be noted that any new dataset should have the ability to include the contacted persons and their data, even if the person did not contact anyone, such as Person B.

For simplicity, the datasets will contain 1st and 2nd-degree infection possibilities only. In addition, it will be assumed that each person can contact up to five persons only.

Figure 6. Patients’ datasets after fourteen days from discovering the infection.

Based on the information provided earlier, develop a C++ code that uses OOP concepts to solve the design problem. In addition, the code must fulfil the following conditions:

  1. Use 1 class, at least, where each class must perform a certain
  2. Use 2 member functions, at least, where each function must perform a certain
  3. Empty classes and member functions will not be
  4. All the persons’ variables must be declared inside the class(es), and must not be
  5. No global variables/constants are
  6. The program must not have hard-coded persons’ variables (names, IC/passport numbers, …, etc.).
  7. The program should keep asking for the user’s input until it is terminated by the
  8. Consider the following scenarios (these are not the only possible ones):

COVID-19 Infection Tracker.

  1. Add/modify
  2. View

Enter your choice: 4

Wrong input. Please try again. Enter your choice: 1

Add/modify data menu. There is/are 0 infected person(s).

  1. New
  2. Modify existing
  • Main menu. Enter your choice: 1

Add/modify data menu. There is/are 1 infected person(s).

  1. New
  2. Modify existing
  3. Main

Details of the person(s) who contacted Person I: Details of Person #1:

Name: Person K IC/passport: 741

Age: 30

Gender (M/F): F

Health condition (I/F/S/N):

The program does not track more than this level. Thus, it will not ask for the number of contacted persons here.

Details of Person #5:

Name: Person J IC/passport: 98765

Age: 18

Gender (M/F): F

Health condition (I/F/S/N): F

Number of persons who contacted Person J (0 - 5): 0

Add/modify data menu. There is/are 2 infected person(s).

  1. New
  2. Modify existing
  3. Main menu. Enter your choice: 3

COVID-19 Infection Tracker.

  1. Add/modify
  2. View

Enter your choice: 2

View data menu.

  1. Find a person’s
  2. Main menu. Enter your choice: 1

Enter the person’s IC/passport number: AAA111 This user does not exist. Please try again.

Enter the person’s IC/passport number: E123456

Details of Person E:

Age: 20

Gender (M/F): M Health condition: I

Number of contacted persons: 5

Details of persons contacted by Person E:

Back to the previous level to complete the

Person #1:

Name: Person F IC/passport: 123789

Age: 35

Gender (M/F): M

Health condition (I/F/S/N): F Number of contacted persons: 0

Details of Person #2:

Name: Person G IC/passport: G128 Age: 18

Gender (M/F): M

Health condition (I/F/S/N): F Number of contacted persons: 0

Details of Person #3:

Name: Person H IC/passport: 88052

Age: 40

Gender (M/F): F

Health condition (I/F/S/N): F Number of contacted persons: 0

Details of Person #4:

Name: Person I IC/passport: I456 Age: 30

Gender (M/F): M

Health condition (I/F/S/N): F Number of contacted persons: 3

Details of persons contacted by Person I: Details of Person #1:

Name: Person K IC/passport: 741

Age: 30

Gender (M/F): F

Health condition (I/F/S/N): S

Details of Person #2: Name: Person L IC/passport: L963 Age: 40

Gender (M/F): M

Health condition (I/F/S/N): S

Details of Person #3: Name: Person M

IC/passport: 456123

Age: 20

Gender (M/F): F

Health condition (I/F/S/N): S

Details of Person #5:

Name: Person J IC/passport: 98765

Age: 18

Gender (M/F): F

Health condition (I/F/S/N): F Number of contacted persons: 0

Attachments:

Instructions Files

C++ Programming Experts

expert
Eric Bell
C++ Programming

88 Answers

expert
Dinh Hong P.
C++ Programming

20 Answers

View More Experts
Disclaimer

The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.

Get Free Quote!

261 Experts Online