fr.jussieu.gla.wasa.samples.magicsquare
Class Square
java.lang.Object
|
+--fr.jussieu.gla.wasa.samples.magicsquare.Square
- public class Square
- extends java.lang.Object
A square with cells containing int value.
- Version:
- $Revision: 1.5 $ $Date: 2002/04/15 17:07:13 $
- Author:
- Florent Selva, Laurent Caillette
Constructor Summary |
Square(int size)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Square
public Square(int size)
getCell
public int getCell(int line,
int column)
getLineSum
public int getLineSum(int line)
getColumnSum
public int getColumnSum(int column)
getFisrtDiagonalSum
public int getFisrtDiagonalSum()
getSecondDiagonalSum
public int getSecondDiagonalSum()
setCell
public void setCell(int line,
int column,
int content)
setCell
public void setCell(int n,
int content)
swap
public void swap(int cell1,
int cell2)
swap
public void swap(int line1,
int column1,
int line2,
int column2)
printInfo
public void printInfo()