java.lang.ObjectStudent
SuffolkResident
public final class SuffolkResident
The SuffolkResident class definition which manages student tuition field.
Field Summary |
---|
Fields inherited from interface |
---|
FT_TUITION, PT_TUITION |
Constructor Summary | |
---|---|
SuffolkResident(java.lang.String firstName,
java.lang.String lastName,
java.lang.String grade,
int credits)
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 based on number of credits. |
Methods inherited from class |
---|
getCredits, getFirstName, getGrade, getLastName, setCredits, setFirstName, setGrade, setLastName, setStudent, toString |
Methods inherited from class |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SuffolkResident(java.lang.String firstName, java.lang.String lastName, java.lang.String grade, int credits)
firstName
- the student's first namelastName
- the student's last namegrade
- the student's letter gradecredits
- the number of credits carried by the studentMethod 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