public class Quadcopter { private double xLocation, yLocation, xDestination, yDestination; private double maxSpeed; public void setLocation(double x, double y) { xLocation = x; yLocation = y; } public void setMaxSpeed(double maxSpeed) { this.maxSpeed = maxSpeed; } public void setDestination(double x, double y) { xDestination = x; yDestination = y; } public double getXDestination() { return xDestination; } public double getYDestination() { return yDestination; } public double distanceToDestination() { double dx = xLocation - xDestination; double dy = yLocation - yDestination; double dist = Math.sqrt(dx * dx + dy * dy); return dist; } public double timeToDestination() { double distToTravel = distanceToDestination(); double time = distToTravel / maxSpeed; return time; } }