JMU
logoChemicalc.png
The Element Class


Introduction

Purpose: An immutable encapsulation of an element

Details
Attributes:
This class must, at a minimum, contain the following private attributes:

    calculatedAverageMass - A double value containing the calculated average mass
    atomicNumber - An int containing the atomic number
    symbol - A String containing the symbol

The Explicit Value Constructor:
This class must implement the following explicit value constructor:
    /**
     * 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) 
    {
    } 
    
The getCalculatedAverageMass() Method:
This class must implement the following method:
    /**
     * 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()
    {
    }
    
The toString() Method:
This class must implement the following method:
    /**
     * Get a String representation of this Element
     *
     * @return  The String representation
     */
    public String toString()
    {
    }
    

Copyright 2013