import java.util.*; public class Force { private Acceleration acceleration; private Map.Entry<Double, Double> force; public Force(Acceleration acceleration) { this.acceleration = acceleration; } public void gravity(double y) { this.force = new AbstractMap.SimpleEntry<>(0.0, y); acceleration.setForce(this.force); acceleration.updateAcceleration(); } public Map.Entry<Double, Double> getForce() { return force; } }