The code simulates a particle along with its dynamics and energy calculations using object-oriented design