package jcgp.fitness; import jcgp.Parameters; public class TestCase { private int[] inputs; private int[] outputs; public TestCase(int[] inputs, int[] outputs) throws ParameterMismatchException { if (inputs.length == Parameters.getInputs()) { this.inputs = inputs; } else { throw new ParameterMismatchException(); } if (outputs.length == Parameters.getOutputs()) { this.outputs = outputs; } else { throw new ParameterMismatchException(); } } public int getInput(int index) { return inputs[index]; } public int getOutput(int index) { return outputs[index]; } public int[] getInputs() { return inputs; } public int[] getOutputs() { return outputs; } }