Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hospital emergency room assign patient priority base on symptom of the patient. Each patient receives an identity number which prioritizes the order of emergency for

Hospital emergency room assign patient priority base on symptom of the patient. Each patient receives an identity number which prioritizes the order of emergency for the patient. The lower the number is, the higher the emergency will be. Use java.util.PriorityQueue to write a java program to create the emergency room registration database. The patient.txt is the input file for patient record. Download patient.txt, Patient.java to perform following specifications: Load all records from the input file. At the end, print the list in assigned priority order.

Patient.java

//******************************************************************* // Patient.java //*******************************************************************

public class Patient { private int id; private String name; private String emergencyCase;

//---------------------------------------------------------------- // Creates a customer with the specified id number. //---------------------------------------------------------------- public Patient (int number, String custName,String er ) { id = number; name = custName; emergencyCase = er; }

//---------------------------------------------------------------- // Returns a string description of this customer. //---------------------------------------------------------------- public String toString() { return "Patient priority id: " + id+" Patient name: "+name+" Symptom: "+emergencyCase; } public String getName() { return name; } public int getId() { return id; } public String getCase() { return emergencyCase; }

}

patient.txt

10,Sam,Bleeding 02,Carla,Stroke 92,Woody,Flu 11,Diane,High-temperature 32,Norm,Stomach 55,Cliff,Broken-bone 06,Tom,Gun-wounds 22,Kristen,Pregnancy

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago