Class SeniorCitizen

java.lang.Object
  extended by Student
      extended by SeniorCitizen
All Implemented Interfaces:
Tuition

public final class SeniorCitizen
extends Student
implements Tuition

The SeniorCitizen class definition which manages student tuition field.

Version:
Copyright 2002 (c) SCCC West
Author:
Carl B. Struck

Field Summary
 
Fields inherited from interface Tuition
FT_TUITION, PT_TUITION
 
Constructor Summary
SeniorCitizen(java.lang.String firstName, java.lang.String lastName)
          The constructor sets initial value for the student tuition field.
 
Method Summary
 int getTuition()
          Returns the student's semester tuition field as an int value.
 java.lang.String getTuitionString()
          Returns the formatted semester tuition field with a label as a String.
 void setTuition()
          Sets the semester tuition for a student which is always set to zero(0) for a senior citizen.
 
Methods inherited from class Student
getCredits, getFirstName, getGrade, getLastName, setCredits, setFirstName, setGrade, setLastName, setStudent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SeniorCitizen

public SeniorCitizen(java.lang.String firstName,
                     java.lang.String lastName)
The constructor sets initial value for the student tuition field. The letter grade for senior citizens always is set to an empty String. Credits for senior citizens always is set to zero(0). Explicit call to superclass Student constructor sets initial values for the student first name, last name, grade and credits fields.

Parameters:
firstName - the student's first name
lastName - the student's last name
Method Detail

getTuition

public int getTuition()
Returns the student's semester tuition field as an int value. This method must be implemented because the class SuffolkResident implements the Tuition interface which defines the abstract getTuition() method.

Specified by:
getTuition in interface Tuition
Returns:
student's tuition

getTuitionString

public java.lang.String getTuitionString()
Returns the formatted semester tuition field with a label as a String. This method must be implemented because the class SeniorCitizen extends the Student class which defines the abstract getTuitionString() method.

Specified by:
getTuitionString in class Student
Returns:
formatted tuition field with label as a String.

setTuition

public void setTuition()
Sets the semester tuition for a student which is always set to zero(0) for a senior citizen. This method must be implemented because the class SuffolkResident implements the Tuition interface which defines the abstract setTuition() method.

Specified by:
setTuition in interface Tuition