/* * IPerson.java * * Created on August 8, 2003, 11:36 PM * * @author Zuo Yan */ package mvc143; /** The interface to a person in the bus system model. *
* A person object contains data about a particular person in the bus system * model. A person can either be waiting at a bus stop or on a bus and thus * not have its own coordinate in the world. A person can be registered with * the bus system model by adding the person to a bus or bus stop. *
* Note that instantiation of a new person should only be done in the model,
* because each model can have a different internal representation of a person.
*/
public interface IPerson {
/** Gets the model dependent object identifying this person.
*
* Note: it is not a requirement that ids have be unique
*
* @return the object identifying this person
*/
Object getID();
/** Gets the current status of this person
*
* @return true
if this person is waiting at a bus stop
* false
otherwise
*/
boolean isWaiting();
/** Sets the current status of this person
*
* @param status whether the person is currently waiting at a bus stop or not
*/
void setWaiting(boolean status);
/** Gets the destination bus stop that this person wants to get to
*
* @return the bus stop
*/
IBusStop getDestinationStop();
/** Gets the bus stop that this person started from
*
* @return the bus stop
*/
IBusStop getStartingStop();
/** Changes the destination bus stop that this person wants to get to
*
* @return the new destination bus stop
*/
void chngDestStop(IBusStop dest);
}