Created boat class & tests

This commit is contained in:
Michael Rausch
2017-03-03 16:22:31 +13:00
parent 7ef64ad7a0
commit 527afdb4a9
3 changed files with 60 additions and 2 deletions
+32
View File
@@ -0,0 +1,32 @@
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;
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;
}
}