import java.util.*; public class Force { private Acceleration acceleration; private Pair<Double> force; public Force(Acceleration acceleration) { this.acceleration = acceleration; } public void gravity(double y) { this.force = new Pair<>(0.0, y); acceleration.updateForce(force); } public Pair<Double> getForce() { return force; } }