package entities; public class Mass { private Acceleration acceleration; private double value = 1.0; public Mass(Acceleration acceleration) { this.acceleration = acceleration; } public void setMass(double x) { this.value = x; acceleration.updateMass(value); } public double getValue() { return value; } }