InPatientpublic class InPatient extends Patient
Fields Summary |
---|
private int | numberDaysResident | private String | wardName |
Methods Summary |
---|
public void | displayInPatientDetails(java.awt.Graphics g, int x, int y)
//Call the super-class method to display some of the data
displayPatientDetails(g,x,y);
// display the rest
g.drawString("Number of Days Resident = " + numberDaysResident, x, y + 60);
g.drawString("Ward = " + wardName, x, y + 80);
| public int | getNumberDaysResident()
return numberDaysResident;
| public void | incrementDaysResident()
numberDaysResident++;
| public void | setInPatientDetails(java.lang.String name, int pulse, java.lang.String ID, int numberDaysResident, java.lang.String wardName)
// Some of this data belongs to the the superclass 'PatientClass', so we
// can use a public method of that superclass to set it.
setPatientDetails(name , pulse , ID);
// copy over the last two parameters.
this.numberDaysResident = numberDaysResident;
this.wardName = wardName;
|
|