Purpose: An immutable encapsulation of an element
calculatedAverageMass
- A double value
containing the calculated average massatomicNumber
- An int
containing
the atomic numbersymbol
- A String
containing the symbol/** * Explicit Value Constructor * * Note: The length of the mass array and the abundance * array must be the same (because they must be conformal * arrays). The constructor does not test to ensure that this * is the case. * * @param symbol The chemical symbol of this Element * @param atomicNumber The atomic number of this Element * @param mass The mass for all of the isotopes * @param abundance The abundance in [0,100] for all of the isotopes */ public Element(String symbol, int atomicNumber, int[] mass, double[] abundance) { }
/** * Get the calculated average mass of this Element * * The average mass is normally measured using a mass spectrometer. * So, the value returned by this method is not the value that * one normally finds on the periodic table of the elements. * * @return The calculated (as opposed to measured) average mass */ public double getCalculatedAverageMass() { }
/** * Get a String representation of this Element * * @return The String representation */ public String toString() { }
Copyright 2013