university
Class Unit

java.lang.Object
  extended by university.Unit
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
Academic, Admin, Library

public abstract class Unit
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Abract class for the unit in the University.

See Also:
Serialized Form

Constructor Summary
Unit()
          Creates a new instance of Unit.
Unit(java.lang.String name, Address address)
          Creates a new instance of Unit.
 
Method Summary
 Address getAddress()
          Returns the name of a Unit
 java.lang.String getName()
          Returns the name of the Unit.
 void setAddress(Address address)
          Sets the address of the Unit.
 java.lang.String toString()
          Returns a string representing the Unit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Unit

public Unit()
Creates a new instance of Unit.


Unit

public Unit(java.lang.String name,
            Address address)
Creates a new instance of Unit.

Parameters:
name - The name of the Unit.
address - The address of the Unit.
Method Detail

toString

public java.lang.String toString()
Returns a string representing the Unit.

Overrides:
toString in class java.lang.Object
Returns:
a String of the Unit

getName

public final java.lang.String getName()
Returns the name of the Unit.

Returns:
The name of the Unit

getAddress

public final Address getAddress()
Returns the name of a Unit

Returns:
The name of a Unit

setAddress

public final void setAddress(Address address)
Sets the address of the Unit.

Parameters:
address - The address where the Unit is located