Coding the ParticleSystem class