II. CASE (40%) [LO 3, 40 points] Patients arriving in an emergency unit of a hospital...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
II. CASE (40%) [LO 3, 40 points] Patients arriving in an emergency unit of a hospital are queued based on their arrival. They are then checked by nurses and the nurses have the right to move the patients queue up depending on the nature of the emergency. The nature of the emergency is categorized into 2 different classes as follows: Class 1: high urgency. In this case the patient will move to the front of the queue Class 2: low urgency. In this case the patient will stay in his/her original queue. You as the programmer is going to write a program using C programming language to implement this queueing system. The queue starts from 0 patient. Inputting "service" will remove one patient from the queue. You may use any variation of linked list data structure that you have learned in the class. Your program should validate the input. For example: nature of emergency only accepts 1 or 2. Service only accepts Y or N. An example of simulation would be follows Patient Arrive (Name): Argile Nature of Emergency:2 Queue content: Argile Service? N Patient Arrive (Name): Donna Nature of Emergency:2 Queue content: Argile - Donna Service? N Patient Arrive (Name) : Bobby Nature of Emergency:2 Queue content: Argile - Donna - Bobby Service? Y Queue content: Donna-Bobby Patient Arrive (Name): Meriam Nature of Emergency: 1 Queue content: Meriam Donna Bobby Service? Y Queue content: Donna Bobby Note: Entering "End" in the patient's name will end the program. II. CASE (40%) [LO 3, 40 points] Patients arriving in an emergency unit of a hospital are queued based on their arrival. They are then checked by nurses and the nurses have the right to move the patients queue up depending on the nature of the emergency. The nature of the emergency is categorized into 2 different classes as follows: Class 1: high urgency. In this case the patient will move to the front of the queue Class 2: low urgency. In this case the patient will stay in his/her original queue. You as the programmer is going to write a program using C programming language to implement this queueing system. The queue starts from 0 patient. Inputting "service" will remove one patient from the queue. You may use any variation of linked list data structure that you have learned in the class. Your program should validate the input. For example: nature of emergency only accepts 1 or 2. Service only accepts Y or N. An example of simulation would be follows Patient Arrive (Name): Argile Nature of Emergency:2 Queue content: Argile Service? N Patient Arrive (Name): Donna Nature of Emergency:2 Queue content: Argile - Donna Service? N Patient Arrive (Name) : Bobby Nature of Emergency:2 Queue content: Argile - Donna - Bobby Service? Y Queue content: Donna-Bobby Patient Arrive (Name): Meriam Nature of Emergency: 1 Queue content: Meriam Donna Bobby Service? Y Queue content: Donna Bobby Note: Entering "End" in the patient's name will end the program.
Expert Answer:
Answer rating: 100% (QA)
C CODE include include include structure of linked list node struct node head of the linked list struct node head function prototypes function to inse... View the full answer
Related Book For
Posted Date:
Students also viewed these accounting questions
-
Pick a company of your choice Identify the industry in which this company operates Identify a cost object for this company Provide examples of the following types of costs for this company and the...
-
Choose a company of your choice & discuss its current practices for delivering service quality through people by focusing on any two themes.
-
Complete this house of quality template thanks. House of Quality Strong + O Positive X Negative # Strong - Customer Rating O Direction of Improvement Design Requirements: House of Quality Strong + O...
-
Evaluate the limit using continuity. lim tan(x - y) (x,y) (2,3)
-
Suppose that competitor analysis reveals that the American subsidiary of your firm's German competitor is about to broaden its product mix in the American market by introducing a new line against...
-
Which of these electromagnetic waves has the lowest frequency? (a) infrared (b) visible (c) ultraviolet (d) gamma rays
-
Blue and yellow streams of paint at \(60^{\circ} \mathrm{F}\) (each with a density of \(1.6 \mathrm{slugs} / \mathrm{ft}^{3}\) and a viscosity 1000 times greater than water) enter a pipe with an...
-
Multiple Choice Questions 1. The revenue sources for a Capital Projects Fund include proceeds of a general obligation bond issuance and a capital grant from the State Highway Trust. Assuming there...
-
Calculate the maturity risk premium. At present the real risk free rate of interest is .4 percent while inflation is expected to be 1.9 percent for the next two years. If a 2 year treasury note...
-
Pequity Company purchased 85% of the common stock of Sequity Company on April 1, Year 1 for total consideration of $545,000 cash plus $50,000 of contingent consideration as measured according to GAAP...
-
using Hill Climbing Search. You are given the Initial State and Final State of an 8-Puzzle. Find the Solution 1 5 3 24 7 68 4 258 3 6 1 7 Initial state h1 = the number of misplaced tiles. final state
-
Describe in what ways the market for pizzas is efficient or inefficient in the long run. Explain your answer. which shows the situation facing Mammas Pizza, a pizzeria, to work Problems. The demand...
-
Think of five brand names. To what extent do they meet the criteria of good brand naming as laid out in Table 6.1? Do any of the names legitimately break these guidelines? Table 6.1 Brand name...
-
Review the choice criteria influencing some recent purchases, such as a hairstyle, a meal, etc.
-
Tim is opening a new online store. He plans to hire two workers at $10 an hour. Tim is also considering buying or leasing some new computers. The purchase price of a computer is $900 and after three...
-
a. Find Wandas demand for labor curve. b. How many students does Wandas employ? Wandas is a fish store that hires students to pack the fish. Students can pack the following amounts of fish: The fish...
-
Solve the equation. (3x + 3xy + 3xy) dx + (2xy + 3xy) dy = 0 An implicit solution in the form F(x, y) = C is C, where C is an arbitrary constant, and (Type an expression using x and y as the...
-
What are the two methods used to translate financial statements and how does the functional currency play a role in determining which method is used?
-
What is Web site architecture? What are examples of Web site architecture?
-
How can human behavior pose challenges for a KM project?
-
What are three approaches to e-learning? How are these approaches similar? How are they different?
-
The coupling is used to connect the two shafts together. Assuming that the shear stress in the bolts is uniform, determine the number of bolts necessary to make the maximum shear stress in the shaft...
-
The solid shaft has a diameter of 2 in. If it is subjected to the torques shown, determine the maximum shear stress developed in regions CD and DE of the shaft. The bearings at A and F allow free...
-
The aluminum tube has an inner diameter of 25 mm and a wall thickness of 5 mm. Determine the maximum shear stress in the fixed tube when the force of 600 N is applied to the cables. Also, sketch the...
Study smarter with the SolutionInn App