/********************************************************************* * This class represents a two dimensional matrix of doubles. * * @author Nathan Sprague + * @version V1.0, 1/12 *********************************************************************/ public class Matrix { private int rows; private int columns; private double[][] data; /****************************************************************** * Constructor for objects of class Matrix * @param rows Number of rows. * @param cols Number of columns. * @param initialValue Initial value of all matrix entries. ******************************************************************/ public Matrix(int rows, int cols, double initialValue) { } /****************************************************************** * Return the value from the indicated location in the Matrix. * No error checking is performed. * * @param row Row number. * @param col Column number. * @return The requested value. ******************************************************************/ public double getValue(int row, int col) { } /****************************************************************** * Set the value at the indicated location in the Matrix. * No error checking is performed. * * @param row Row number. * @param col Column number. * @param value The new value. ******************************************************************/ public void setValue(int row, int col, double value) { } // Other methods not shown... } /********************************************************************* * This class represents a lower-triangular Matrix. * * @author Nathan Sprague + * @version V1.0, 1/12 *********************************************************************/ public class LTMatrix { int size; // same number of rows as columns private double[][] data; /****************************************************************** * Constructor for objects of class Matrix * @param rows Number of rows. * @param cols Number of columns. * @param initialValue Initial value of all values on and below * the diagonal. ******************************************************************/ public LTMatrix(int size, double initialValue) { } /****************************************************************** * Return the value from the indicated location in the Matrix. * Any values from above the diagonal are guaranteed to be 0. * No error checking is performed. * * @param row Row number. * @param col Column number. * @return The requested value. ******************************************************************/ public double getValue(int row, int col) { } // Other methods not shown... }