Redefined Pendulum.java