|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuniversity.Person
public abstract class Person
Abstract class that represents people in the university.
Constructor Summary | |
---|---|
Person(java.lang.String name,
Sex gender,
Address address,
Unit unit)
Creates a new instance of Person |
Method Summary | |
---|---|
java.lang.Object |
clone()
Clone a new object |
Address |
getAddress()
Get the Address of the Person. |
Unit |
getAffiliation()
Returns the unit a person belongs to. |
Sex |
getGender()
Returns the sex of a person |
int |
getID()
Returns the ID of a person. |
java.lang.String |
getName()
Returns the name of a person |
void |
setName(java.lang.String name)
Sets the persons name to a new name. |
java.lang.String |
toString()
Returns the String representation of a person. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Person(java.lang.String name, Sex gender, Address address, Unit unit)
name
- The name of the persongender
- The sex of the personaddress
- The address of the personunit
- The unit the person belongs toMethod Detail |
---|
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- Throws CloneNotSupportedExceptionpublic final java.lang.String getName()
public final Sex getGender()
public final Unit getAffiliation()
public final int getID()
public final Address getAddress()
public final void setName(java.lang.String name)
name
- The new name for the person.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |