Here, AsciiChecker
enables the matrix specification in the text form.
abstract class AsciiChecker extends AlgoritmicChecker {
String[] ascii;
AsciiChecker(String title, final String ... ascii) {
super(title, ascii[0].length(), ascii.length); // calls isCovered
};
boolean isCovered(int test, int statement) {
return ascii[statement].charAt(test) == '1';
}
}
It needs the matrix argument to be available in the isCovered
call. Tell me how do I shoot my leg if I initialize the field before using it,
AsciiChecker(String title, final String ... ascii) {
this.ascii = ascii;
super(title, ascii[0].length(), ascii.length); // calls isCovered
};