public class Dashpot extends PhysicsElement implements Connector{ private static int id=0; // Spring identification private final double viscosity; protected Attachable a_end, b_end; private Dashpot(){ // nobody can create an object without state this(0); } public Dashpot(double vis){ super(id++); this.viscosity = vis; a_end = b_end = null; } public void attachEnd (Attachable sa) { // note: we attach a spring to a ball, if(a_end==null) // not the other way around. a_end = sa; // to be completed by you } private double getSpeed() { // to be coded by you } public double getForce(Ball ball) { double force = 0; if ((ball != a_end) && (ball != b_end)) return force; // to be completed by you } public String getDescription() { // to be coded by you } public String getState() { // to be coded by you } }