1 // This class memorizes a conflict
3 public class Conflict {
4 public Point4d coordinates; // its position
5 public Flight flight1, flight2; // the two flights involved in the conflict
7 public Conflict(Point4d coord, Flight f1, Flight f2) {
13 public boolean hasFlights(Flight f1, Flight f2) {
14 if ( ((flight1.flightID==f1.flightID)&&(flight2.flightID==f2.flightID))||
15 ((flight1.flightID==f2.flightID)&&(flight2.flightID==f1.flightID)) )
20 public String toString() {
21 return ("Conflict at time "+coordinates.time+" position "+coordinates+" between "+
22 flight1.flightID+" and "+flight2.flightID+".");