Package dev.bbzbl.m320
Class Ship
java.lang.Object
dev.bbzbl.m320.Ship
Class which contains the logic of a ship.
- Version:
- 1.0
- Author:
- yannick
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Ship
Constructor to create a new Ship- Parameters:
nr- the ship numbername- the name of the ship
-
-
Method Details
-
getNr
public int getNr()Getter for Number- Returns:
- the ship number
-
setNr
public void setNr(int nr) Set the ship number- Parameters:
nr- the number of the ship
-
getName
Getter Method for the ship name- Returns:
- the ship name
-
setName
Setter Method for the ship name- Parameters:
name- the name of the ship
-
race
public void race()Method to start a new race and to generate a new time -
getTime
public int getTime()Method to get the time- Returns:
- the race time
-