import java.util.ArrayList;
public class ShipCrashWarningSystem {
/**
* @param listOfShips
*
* @return
*/
public static ArrayList<ArrayList<Ship>> findConflictedShips(
ArrayList<Ship> listOfShips) {
//TODO findConflictedShips()
return null;
}
/**
*
* @param coordinates1
* @param coordinates2
*
* @return
*/
public static double calculateGradient(Coordinates coordinates1,
Coordinates coordinates2) {
//TODO calculateGradient()
return -1;
}
/**
*
* @param coordinates
* @param gradient
*
* @return
*/
public static double calculateConstant(Coordinates coordinates,
double gradient) {
//TODO calculateConstant()
return -1;
}
/**
*
* @param coordinateHistoryOfFirstShip
* @param coordinateHistoryOfSecondShip
*
* @return
*/
public static boolean willCrash(ArrayList<Coordinates> coordinateHistoryOfFirstShip,
ArrayList<Coordinates> coordinateHistoryOfSecondShip) {
//TODO willCrash()
return null;
}
/**
*
* @param intersectionCoordinates
* @param coordinateHistoryOfTheShip
*
* @return
*/
public static boolean doesGoToIntersection(Coordinates intersectionCoordinates,
ArrayList<Coordinates> coordinateHistoryOfTheShip) {
//TODO doesGoToIntersection()
return false;
}
/**
*
* @param firstCoordinatesOfFirstLine
* @param secondCoordinatesOfFirstLine
* @param firstCoordinatesOfSecondLine
* @param secondCoordinatesOfSecondLine
*
* @return
*/
public static Coordinates calculateIntersectionCoordinates(
Coordinates firstCoordinatesOfFirstLine,
Coordinates secondCoordinatesOfFirstLine,
Coordinates firstCoordinatesOfSecondLine,
Coordinates secondCoordinatesOfSecondLine) {
return null;
}
/**
*
* @param firstCoordinatesOfFirstLine
* @param secondCoordinatesOfFirstLine
* @param firstCoordinatesOfSecondLine
* @param secondCoordinatesOfSecondLine
*
* @return
*/
public static double calculateAngleBetween(Coordinates firstCoordinatesOfFirstLine,
Coordinates secondCoordinatesOfFirstLine, Coordinates firstCoordinatesOfSecondLine,
Coordinates secondCoordinatesOfSecondLine) {
return -1;
}
public static void main(String[] args) {
/*
* This main method is a stub.
* It does nothing.
* Feel free to write your own code to test your implementation.
* In this case, we have nothing actionable in here, just this comment block, so the JVM should rapidly lose interest and move on to the rest of your code.
*/
}
}