Lab1_113(2) - nbPatients represents the current number of...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
KSU / CCIS / CS DEPARTMENT CSC-113, SPRING 2010 LAB 1 – PRIMITIVE DATA ARRAYS We want to develop a system that manages patients in a hospital emergency department. The department cannot deal with more than 50 patients. For each new patient, the id , the emergency case and the gender are recorded. The emergency case is ranked from 1 : not critical to 5 : extremely critical. If the patient is male the gender is set to 1 otherwise it is set to 0 . The class Waiting shows the above-specified properties. +Waiting() +insert(in id : int, in case : int, in gender : int) +patientInformation(in g : int, in status : int) : int +displayPatientInfo(in id) +getIndexofHighestEmCase() : int +deletePatient(in index : int) +processPatient() : void -PID : int -emCase : int -gender : int -nbPatients : int Waiting The attribute
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: nbPatients represents the current number of patients in the emergency department The Waiting class gives the following methods:  Waiting : Initially no patient is waiting.  insert : inserts a new patient.  patientInformation : returns the number of patients that have the gender g and the emergency case status  displayPatientInfo : display all information of the patient that has the identification id  getIndexofHighestEmCase : returns the index (position) of the first patient that has the highest emergency case  deletePatient: deletes the patient located at the position index  processPatient : removes the first patient that has the highest emergency case. Implement the class Waiting using Java and write a main class to test your code. [] [] []...
View Full Document

This note was uploaded on 08/18/2011 for the course COMPUTER S CSC 113 taught by Professor Dr.safwanqasem during the Spring '11 term at King Saud University.

Ask a homework question - tutors are online