You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
667 B
33 lines
667 B
package seng302;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.Arrays;
|
|
import java.util.Collections;
|
|
|
|
/**
|
|
* Created by fwy13 on 3/03/17.
|
|
*/
|
|
public class Event {
|
|
private RaceMarker raceMarker;
|
|
private Boat boat;
|
|
private int time;
|
|
|
|
public Event(RaceMarker raceMarker, Boat boat, int time){
|
|
this.raceMarker = raceMarker;
|
|
this.boat = boat;
|
|
this.time = time;
|
|
}
|
|
|
|
public void setTime(int time){
|
|
this.time = time;
|
|
}
|
|
|
|
public int getTime(){
|
|
return this.time;
|
|
}
|
|
|
|
public String toString() {
|
|
return boat.getName() + " passed " + raceMarker.toString() + " at " + time + " seconds.";
|
|
}
|
|
}
|