A simple attempt at physics in Java