Class Patient

java.lang.Object
  |
  +--java.util.Observable
        |
        +--Patient

public class Patient
extends Observable

A patient in a hospital.


Field Summary
protected static String[] LAST_NAMES
          Last names for patients.
protected  String name
          Name of this.
protected  Need need
          Need of this.
protected  double status
          Status of this.
 
Constructor Summary
Patient()
          Constructs a patient.
 
Method Summary
 String getName()
          Returns the name of this.
 Need getNeed()
          Returns the need of this.
 double getStatus()
          Returns the status of this.
 void healOneMinute()
          Causes this patient to heal for one minute.
 boolean isCritical()
          Returns whether or not this is in critical condition.
 boolean isHealed()
          Returns whether or not this is totally healed.
 boolean isSerious()
          Returns whether or not this is in serious condition.
 boolean isStable()
          Returns whether or not this is in stable condition.
 void waitOneMinute()
          Causes this patient to wait for one minute.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LAST_NAMES

protected static final String[] LAST_NAMES
Last names for patients.


name

protected String name
Name of this.


need

protected Need need
Need of this.


status

protected double status
Status of this.

Constructor Detail

Patient

public Patient()
Constructs a patient.

Method Detail

getName

public String getName()
Returns the name of this.


getStatus

public double getStatus()
Returns the status of this.


getNeed

public Need getNeed()
Returns the need of this.


isCritical

public boolean isCritical()
Returns whether or not this is in critical condition.


isSerious

public boolean isSerious()
Returns whether or not this is in serious condition.


isStable

public boolean isStable()
Returns whether or not this is in stable condition.


isHealed

public boolean isHealed()
Returns whether or not this is totally healed.


waitOneMinute

public void waitOneMinute()
Causes this patient to wait for one minute.


healOneMinute

public void healOneMinute()
Causes this patient to heal for one minute.