|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Course
Course is truly a misnomer here. However, it is instructional for showing how Assignment 1 works. Course holds a collection (here, a Vector) of Player objects. When calls to addPlayer are made, the Vector adds the incomming Player object to itself. When getPlayers is called, a new Group object is returned with the collection of Player objects as the constructor's argument, so that the Group will be iterating over the right collection of Players. Bugs: none known
also
Constructor Summary | |
Course()
The constructor takes no parameters. |
Method Summary | |
void |
addPlayer(Player newPlayer)
Adds a player to the course |
Group |
getPlayers()
returns an (ennumeration) (dictionary) ordered collection of the Player objects that are on the Course. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Course()
Method Detail |
public void addPlayer(Player newPlayer)
newPlayer
- the new Player object reference to be addedpublic Group getPlayers()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |