Question: Study the scenario and complete the questions that follow: Record of Hospital Patient The data of the patients at Pretoria West Hospital is now

Study the scenario and complete the questions that follow: Record of Hospital Patient The data of the

Study the scenario and complete the questions that follow: Record of Hospital Patient The data of the patients at Pretoria West Hospital is now being retrieved in the format shown below, which will afterwards be shown in a console. Data about the patients are entered into a text file using a specified format used by the hospital office administrator. Assume that the format is specified line by line, with each patient's data consisting of the following information: patient number, last name, first name, age group, sex, and weight, all of which are recorded in this order and are separated by commas, such as 10005, Linda, Khumalo, Young Adult, Female, 56.40; the following entry will be on the following line. The age categories are classified into the following groupings and descriptions: Neonate (the first four weeks of life), Infant (1 month - 1 year), Toddler (1-3 years), Pre-school child (3-5 years), School Age Child (6 - 12 years), Adolescent (13-18 years), Young Adult (1940 years), Middle-Aged Adult (41 - 65 years), and Older Adult (over 65 years). Create a C# program that will produce the output on a console application as shown in Figure 1.1 by creating a text file using the format described above, which will serve as the input to your program. --PATIENT DATA--- 10015 Dlamini Nkosi Infant Male 5.60 10005 Linda Khumalo Young Adult Female 56.4 10100 Sithole Mahlangu older Adult Male 91.77 10012 Mokoena Mkhize School Age Child Male 9.82 10132 Ntombi Zulu Toodler Female 10.61 Figure 1.1: Patient Data Source: Obaro A (2023) 1.1 Using object-oriented programming Abstract Data Types (ADT) principles in C#: a. Create a namespace PatientTextFile and 2 classes. One class must be called PatientData and the other ReadTextFile. b. The class PatientData must declare all the attributes of the patient data. (3 Marks) C. The class ReadTextFile must read the text file (this will be created by the students), convert it to a list, iterate through the list of entries and produce an output as in Figure 1.1. (7 Marks) [Sub Total 20 Marks] 1.2 Suppose you have been provided with Figure 1.1 which is in no particular order. Implement the sorting algorithm in C# using classes and list ADT to get the results shown in Figure 1.2. It should be noted that the patient information has been sorted by both patient sex and patient number in descending order. Unsorted List 10015 Nkosi Dlamini Infant Male 5.6 10005 Khumalo Linda Young-Adult Female 56.4 10100 Mahlangu Sithole older-Adult Male 91.77 10012 Mkhize Mokoena School-Age-Child Male 9.82 10132 Zulu Ntombi Toodler Female 10.61 Sorted List by Patient Number 10132 Zulu Ntombi Toodler Female 10.61 10100 Mahlangu Sithole older-Adult Male 91.77 10015 Nkosi Dlamini Infant Male 5.6 (10 Marks) 10012 Mkhize Mokoena School-Age-Child Male 9.82 10005 Khumalo Linda Young-Adult Female 56.4 Sorted List by Sex 10132 Zulu Ntombi Toodler Female 10.61 10005 Khumalo Linda Young-Adult Female 56.4 10100 Mahlangu Sithole older-Adult Male 91.77 10015 Nkosi Dlamini Infant Male 5.6 10012 Mkhize Mokoena School-Age-Child Male 9.82 Figure 1.2: Sorted record Note: Students must comment on the code to prove that they understand the implementation. Also, the text file created, and the source code should be submitted. (10 Marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The image contains a scenario and set of tasks to be completed for a hypothetical programming assignment It outlines the creation of a C program that ... View full answer

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 Programming Questions!