FileDocCategorySizeDatePackage
InPatient.javaAPI DocExample1185Sun Oct 21 17:02:30 BST 2001myprojects.hospital

InPatient

public class InPatient extends Patient

Fields Summary
private int
numberDaysResident
private String
wardName
Constructors Summary
Methods Summary
public voiddisplayInPatientDetails(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 intgetNumberDaysResident()

		return numberDaysResident;
	
public voidincrementDaysResident()

		numberDaysResident++;
	
public voidsetInPatientDetails(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;