Class Course

java.lang.Object
  |
  +--Course

public class Course
extends java.lang.Object

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

See Also:
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

Course

public Course()
The constructor takes no parameters. It only initializes the collection of objects to a new collection, currently holding nothing.

Method Detail

addPlayer

public void addPlayer(Player newPlayer)
Adds a player to the course

Parameters:
newPlayer - the new Player object reference to be added

getPlayers

public Group getPlayers()
returns an (ennumeration) (dictionary) ordered collection of the Player objects that are on the Course.

Returns:
an ordered collection of the Player objects