Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!

# Can any one help me to develop this code

Nilesh Raje
Ranch Hand
Posts: 153
Non-relativistic particles travelling through a medium lose energy. The energy lost per unit length travelled in the
medium, dE
dx , is given by the formula:
dE
dx
= −
0.288
mv2
ZM
AM
ln E
459.0IM
which depends on the energy of the particle, E, the mass of the particle, m, the velocity of the particle, v, the
atomic number of the medium, ZM, the atomic mass of the medium, AM, and the ionisation potential of the
medium, IM.
The name, ZM and AM values for several media are listed in the URL:
http://www.hep.ucl.ac.uk/~markl/teaching/3c59/exam/materials.dat and IM is given by the formula :
IM = 16 � 10−6Z0.9
M .
The names and masses of the particles we will consider in this exercise are listed in the URL:
http://www.hep.ucl.ac.uk/~markl/teaching/3c59/exam/particles.dat This file has the particle�s name
and mass on each line.
The URL: http://www.hep.ucl.ac.uk/~markl/teaching/3c59/exam/results.dat
has a list of material names, particle names and particle energies (E). The particle�s energy, E, is related to the
particles mass, m and velocity v, through E = 1
2
mv2.
Using these three URLs, write appropriate classes for both the particle and the material that can be used to
determine which entry in the results.dat file would result in the largest energy loss per unit length.

Ernest Friedman-Hill
author and iconoclast
Marshal
Posts: 24208
35
So what have you done so far?

Jaime M. Tovar
Ranch Hand
Posts: 133
When you have to hand it in?