Class SuffolkResident

java.lang.Object
  extended by Student
      extended by SuffolkResident
All Implemented Interfaces:
java.io.Serializable, Tuition

public final class SuffolkResident
extends Student
implements Tuition

The SuffolkResident class definition which manages student tuition field.

Version:
Copyright 2002 (c) SCCC West
Author:
Carl B. Struck
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface
FT_TUITION, PT_TUITION
 
Constructor Summary
SuffolkResident()
          Constructor sets default values for student first name, last name, grade and credits fields.
SuffolkResident(java.lang.String firstName, java.lang.String lastName, java.lang.String grade, int credits)
          Explicit call to superclass constructor Student sets initial values for the student first name, last name, grade and credits fields.
 
Method Summary
 int getTuition()
          Returns the semester tuition for a student as an int based on number of credits.
 java.lang.String getTuitionString()
          Returns the formatted semester tuition field with a label as a string.
 
Methods inherited from class
getCredits, getFirstName, getGrade, getLastName, setCredits, setFirstName, setGrade, setLastName, toString
 
Methods inherited from class
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SuffolkResident

public SuffolkResident()
Constructor sets default values for student first name, last name, grade and credits fields.


SuffolkResident

public SuffolkResident(java.lang.String firstName,
                       java.lang.String lastName,
                       java.lang.String grade,
                       int credits)
Explicit call to superclass constructor Student 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
grade - the student's letter grade
credits - the number of credits carried by the student
Method Detail

getTuition

public int getTuition()
Returns the semester tuition for a student as an int based on number of credits. If credits from superclass Student are less than 12, multiply credits by the part-time tuition rate; otherwise tuition is set to the flat full-time rate. This method must be implemented because class SuffolkResident implements the Tuition interface which defines the abstract getTuition() method.

Specified by:
getTuition in interface Tuition
Returns:
The 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 class SuffolkResident extends the Student class which defines abstract getTuitionString() method.

Specified by:
getTuitionString in class Student
Returns:
Formatted semester tuition value with label as a string