Skip to content

Instantly share code, notes, and snippets.

public class ThreeByThreeMatrix extends SquareMatrix
{
private static final double[][] IDENTITY_MATRIX = {{1,0,0},{0,1,0},{0,0,1}};
/**
* constructor for class ThreeByThreeMatrix
*/
public ThreeByThreeMatrix()
{
super(3);
public class TwoByTwoMatrix extends SquareMatrix
{
private static final double[][] IDENTITY_MATRIX = {{1,0}, {0,1}};
/**
* constructor for the class TwoByTwoMatrix
*/
public TwoByTwoMatrix()
{
super(2);
public class SquareMatrix extends Matrix
{
private int order;
/**
* constructor for class SquareMatrix
* @param n
*/
public SquareMatrix(int n)
{
public class Matrix
{
private int rows;
private int columns;
private double[][]theMatrix;
/**
* Constructor for class Matrix
* @param setRows
* @param setColumns
*/