Study the scenario and complete the questions that follow: Record of Hospital Patient The data of...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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) 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)
Expert Answer:
Answer rating: 100% (QA)
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 the full answer
Related Book For
Operations Management Processes And Supply Chains
ISBN: 9781292409863
13th Global Edition
Authors: Lee Krajewski, Naresh Malhotra, Larry Ritzman
Posted Date:
Students also viewed these programming questions
-
Weston Products manufactures an industrial cleaning compound that goes through three processing departments-Grinding, Mixing, and Cooking. All raw materials are introduced at the start of work in the...
-
Air at 1 atmosphere and a temperature of 60 F enters 1/2-in. id tube with a velocity of 80 fps. The wall is maintained at a constant temperature of 210 F by condensing steam. Fin the convective...
-
What do you think about this shift into analytics and data measurement of your content/marketing materials?
-
On 1 May 2006, Nigel acquired a 30-year lease for 20,000. He assigned the lease on 1 November 2020 for 75,000. Kay purchased land in February 2012 for 20,000. She sold one-third of the land for...
-
What are the two basic methods for translation used globally?
-
In each diagram below, I and II represent sampling distributions of two statistics that might be used to estimate a parameter. In each case, identify the statistic that you think would be the better...
-
(Portfolio statistics of two stocks) Calculate the average return and the variance of a portfolio composed of 30% of GM and 70% of Microsoft (MSFT) stocks, using the following data: 1. A B A...
-
Carrolla Company has issued three different bonds during 2014. Interest is payable semiannually on each of these bonds. 1. On January 1, 2014, 1,000, 8%, 5-year, $1,000 bonds dated January 1, 2014,...
-
pi Ciasally each of the following equations by specifying - Order of this equation . of independent variables . Linear, non-linear . Homogeneous, non-homogeneous - Elliptic, parabolic, hyperbolic....
-
Adriaan Taylor Corporation is a newly formed entity that engages in the purchase and resale of amphibious tour vehicles. Purchases for the first year of operation were as follows: Date Purchases...
-
The provided data outlines the proportion of AACSB business accredited U.S. business schools with separate accounting accreditation over various years, indicating a fluctuating trend. The percentages...
-
Write down 3 things you would have learned from the prospective student that helped you decide what program you should suggest for them. What product features (classes/instructors/graduation...
-
Becky needs another $1,100 in her vehicle fund to purchase the car she wants. Her parents offer to loan her the money, but want to teach her about the time value of money. They offer to have her...
-
The SCF was issued in direct response to FASB Concept Statement I, which stated that the primary objective of financial reporting is to "provide information to help investors and creditors, and other...
-
5. A person started transport business with a fleet of 10 taxis. The various expenses incurred by him are given below: (i) Cost of each taxi (ii) Salary of office staff (iii) Salary of garage staff...
-
A standing wave is produced in a vibrating string in its third harmonic as shown in the figure. If the length of the string is 1.5m and the frequency of the vibrating motor is 60Hz. Find out the...
-
if two legs of a right triangle are 9 and 11 the hypotenuse is
-
Suppose you won a financial literacy competition and are given FJS10000 to invest, with the condition that investment can be done either in, i) Invest in Unit trust of Fiji or Invest in Fijian...
-
At Dot Corn, a large retailer of popular books demand is constant at 32.000 books per year. The cost of placing an order to replenish stock is $10 and the annual cost of holding is $4 per book. Stock...
-
Choosing which processes are core to a firms competitive position is key strategic decision. For example, Nike a popular sports shoe company focuses on the customer relationship, new product...
-
Beagle Clothiers uses a weighted score for the evaluation and selection of its suppliers of trendy fashion garments. Each supplier is rated on a 10-point scale (10 = highest) for four different...
-
Prepare a sales budget for a not-for-profit organization (Learning Objective 2) Great Start Preschool operates a not-for-profit morning preschool. Each family pays a nonrefundable registration fee of...
-
discuss social, demographic, and technological changes that create greater needs for better management;
-
Continuation of E10-18: prepare an operating expenses budget (Learning} Objectives 1, 2) Refer to Great Start Preschool's data in E10-18. Great Start's primary expense is payroll. The state allows a...
Study smarter with the SolutionInn App