Files
Party-Parrots-At-Sea/src/main/java/seng302/Boat.java
T
Michael Rausch 33994bd3e4 Implemented 'Race' class
- Boats can be added to a race
- calling getFinishedBoats() will return a list of boats in the order that they finished
2017-03-03 18:06:51 +13:00

33 lines
643 B
Java

package seng302;
/*
Represents a boat in the race.
@param teamName The name of the team sailing the boat
*/
public class Boat
{
// The name of the team, this is also the name of the boat
private String teamName = null;
private boolean finishedRace = false;
public Boat(String teamName) {
this.teamName = teamName;
}
/*
Returns the name of the team sailing the boat
@returns The name of the team
*/
public String getTeamName(){
return this.teamName;
}
/*
Sets the name of the team sailing the boat
@param teamName The name of the team
*/
public void setTeamName(String teamName){
this.teamName = teamName;
}
}