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...
-
In a certain stereo system, each speaker has a resistance of 4.00 '. The system is rated at 60.0 W in each channel, and each speaker circuit includes a fuse rated 4.00 A. Is this system adequately...
-
The coefficient of static friction between block A and a horizontal floor is 0.45 and the coefficient of static friction between block B and the floor is 0.30. The mass of each block is 2.0 kg and...
-
Example 5.5 shows how to determine the rotor rotation speed and its gap width to produce emulsion particles \(5 \mu \mathrm{m}\) in diameter. If it is decided that the emulsion particle diameter...
-
Selected transactions for M. Anderson, an interior decorator, in her first month of business, are as follows.Jan. 2 Invested $10,000 cash in business.3 Purchased used car for $4,000 cash for use in...
-
General Motors (GM) has been a global leader in automotive manufacturing for the last several decades. They have become a market leader as it relates to their R&D positioning and have strategically...
-
1. Discuss the main issues faced by Yalla Momos. 2. Evaluate the current financial performance of Yalla Momos and compare his performance to the industry ratios. 3. Elaborate on the relevant factors...
-
A 1-kg mass located at the origin is suspended by ropes attached to the two point (1,1,1) and (-1,-1,1). If the gravity force is pointing in the direction of vector-k, what is the vector describing...
-
Part B: Problem Set - Vertical FDI (65 points total): Consider two firms. The first firm is based in Slovenia and produces ball bearings (upstream firm). The cost of producing ball bearings is 6 per...
-
Cristina is trading ocean - front real property used for business purposes for new real property ( currently owned by Victoria ) to be used in business. Cristina's real property originally cost $ 3 5...
-
Jason is a non immigrant resident , living in the US but, the married his wife before came to the US his wife lives out of the US and dies not have a Social Security, Jason support his two nephews...
-
Explain the purpose of GAAP and identify the ten elements that form the basic building blocks of the financial statements.
-
A limited partnership has three partners, all individuals: Gen ( the general partner ) , LimA ( a limited partner ) and LimB ( a limited partner ) . The original contributions and income / loss...
-
A drawer holds 4 red hats and 4 blue hats. what is probability of getting exactly 3 red hats or 3 blue hats when taking out 4 hats randomly out of drawer and immediately returning every hat to drawer...
-
Discrete sample spaces: suppose there are N cable cars in San Francisco, numbered sequentially from 1 to N. You see a cable car at random; it is numbered 203. You wish to estimate N. (See Goodman,...
-
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...
-
A veterinarian records the weights of cats treated at a clinic. The weights are normally distributed, with a mean of 9 pounds and a standard deviation of 2 pounds. Find the weight x corresponding to...
-
In a randomly selected sample of women ages 20 34, the mean total cholesterol level is 179 milligrams per deciliter with a standard deviation of 38.9 milligrams per deciliter. Assume the total...
-
0.8365 Use the Standard Normal Table or technology to find the z-score that corresponds to the cumulative area or percentile. Table 4-Standard Normal Distribution Arca Z 0 Z .09 .08 .07 .06 .05 .04...
Study smarter with the SolutionInn App