java.lang.ObjectStudent
SeniorCitizen
public final class SeniorCitizen
The SeniorCitizen class definition which manages student tuition field.
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 |
---|
public SeniorCitizen(java.lang.String firstName, java.lang.String lastName)
firstName
- the student's first namelastName
- the student's last nameMethod Detail |
---|
public int getTuition()
int
value.
This method must be implemented because the class SuffolkResident
implements
the Tuition interface which defines the
abstract
getTuition() method.
getTuition
in interface Tuition
public java.lang.String getTuitionString()
extends
the Student class which defines the
abstract
getTuitionString() method.
getTuitionString
in class Student
public void setTuition()
implements
the Tuition interface which defines the
abstract
setTuition() method.
setTuition
in interface Tuition