41 lines
844 B
Java
41 lines
844 B
Java
package serie04;
|
|
|
|
public class FieldTest {
|
|
|
|
public static void main(String[] args) {
|
|
|
|
int[][] m1Table = {
|
|
{0,1,2},
|
|
{1,2,0},
|
|
{2,0,1}
|
|
};
|
|
|
|
int[][] a1Table = { //This is the addition table number 1 which we want to
|
|
{0,1,2,3}, //show is a field.
|
|
{1,0,3,2},
|
|
{2,3,0,1},
|
|
{3,2,1,0}
|
|
};
|
|
|
|
int[][] a2Table = { //This is the addition table for which we know it is not
|
|
{0,1,2,3}, //a field
|
|
{1,0,3,2},
|
|
{2,3,1,0},
|
|
{3,2,0,1}
|
|
};
|
|
|
|
Multiplication m1 = new Multiplication(3, m1Table);
|
|
Addition a1 = new Addition(4, a1Table);
|
|
Addition a2 = new Addition(4, a2Table);
|
|
|
|
Field k4_1 = new Field(4, a1, m1);
|
|
Field k4_2 = new Field(4, a2, m1);
|
|
|
|
System.out.println(k4_1.verifyField() + " this should be true");
|
|
System.out.println(k4_2.verifyField() + " this should be false");
|
|
|
|
|
|
}
|
|
|
|
}
|