Administrator - Returns this administrator's...

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

View Full Document Right Arrow Icon
//******************************************************************** // Administrator.java Authors: Lewis and Loftus // // Solution to Programming Project 7.2 //******************************************************************** public class Administrator extends HospitalEmployee { protected String department; //----------------------------------------------------------------- // Sets up this administrator with the specified information. //----------------------------------------------------------------- public Administrator (String empName, int empNumber, String dept) { super (empName, empNumber); department = dept; } //----------------------------------------------------------------- // Sets this administrator's department. //----------------------------------------------------------------- public void setDepartment (String dept) { department = dept;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } //-----------------------------------------------------------------// Returns this administrator's department. //-----------------------------------------------------------------public String getDepartment() { return department; } //-----------------------------------------------------------------// Returns a description of this administrator as a string. //-----------------------------------------------------------------public String toString() { return super.toString() + " works in " + department; } //-----------------------------------------------------------------// Prints a message appropriate for this administrator. //-----------------------------------------------------------------public void administrate() { System.out.println (name + " works in the " + department + " department."); } }...
View Full Document

This note was uploaded on 05/17/2011 for the course COP 3530 taught by Professor Davis during the Spring '08 term at University of Florida.

Ask a homework question - tutors are online