university
Class Student

java.lang.Object
  extended by university.Person
      extended by university.Student
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
Graduate, Undergraduate

public abstract class Student
extends Person
implements java.lang.Cloneable

Abstract class for the students in the university.

See Also:
Serialized Form

Constructor Summary
Student()
          Creates a new instance of Student
Student(java.lang.String aName, Sex aGender, Address address, Unit aUnit)
          Creates a new instance of Student.
 
Method Summary
 java.lang.Object clone()
          Clone a new object
 boolean isAllowedToRegister()
          Checks if the Student is allowed to register for classes.
 void setAllowedTORegigister(boolean canRegister)
          Set if the Student is allowed to register for class.
 java.lang.String toString()
          Returns A String representation of a Student.
 
Methods inherited from class university.Person
getAddress, getAffiliation, getGender, getID, getName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Student

public Student()
Creates a new instance of Student


Student

public Student(java.lang.String aName,
               Sex aGender,
               Address address,
               Unit aUnit)
Creates a new instance of Student.

Parameters:
aName - The name of the Student.
aGender - The sex of the Student.
address - The address of the Student.
aUnit - The unit the Student belongs to.
Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone a new object

Overrides:
clone in class Person
Returns:
Object a cloned object
Throws:
java.lang.CloneNotSupportedException - Throws CloneNotSupportedException

setAllowedTORegigister

public final void setAllowedTORegigister(boolean canRegister)
Set if the Student is allowed to register for class.

Parameters:
canRegister - Set if the Student can register for class.

isAllowedToRegister

public final boolean isAllowedToRegister()
Checks if the Student is allowed to register for classes.

Returns:
boolen Is the Student allowed to register.

toString

public java.lang.String toString()
Returns A String representation of a Student.

Overrides:
toString in class Person
Returns:
String A String representing a Student.