Updated boat class constructor

- add a new constructor to accept boat velocity

#story[6]
This commit is contained in:
Haoming Yin
2017-03-07 20:28:45 +13:00
parent 5c362245a4
commit a3c1630e2e
+4
View File
@@ -14,6 +14,10 @@ public class Boat
public Boat(String teamName) { public Boat(String teamName) {
this.teamName = teamName; this.teamName = teamName;
} }
public Boat(String teamName, float boatVelocity) {
this.teamName = teamName;
this.velocity = boatVelocity;
}
/* /*
Returns the name of the team sailing the boat Returns the name of the team sailing the boat