There is a task:
Imagine you have been asked by the Physics department to create a Java program to help them record information about experiments they are running on a particle accelerator.
Each type of particle is uniquely identified by name, and has a mass (a decimal number between 0 and 1 that indicates how fast it breeds), and a radioActivedecayLevel (a decimal number between 1 and 10 that signifies how dangerous it is to humans).
Physics run a number of tests on the particles. Each test has one or more types of particle associated with it (up to a maximum of 5), a textual description of the test, the speed (whole number) the particles reached, and a textual result of the test.
In the box below, create the classes, methods and instance variables you would use to create such a program. Note: there is no need to create the whole program – just define the relevant classes, method signatures, constructors and variables/arrays you would use.
My answers:
pseucode
public class Particle
{
String name;
float mass=decimal # from 0 to 1;
float radioActivedecayLevel=decimal # from 1 to 10;
String description;
String result;
int speed;
int testNumber;
}
Thank you!:)
}