Right click on an Option object and click on the 'Show static fields' button and check the order of the options. If they are not in the order they were read in, then maybe sort() had something to do with it.


int correctlyAnswered = 0; String userAnswer; String submittedA = Greenfoot.isKeyDown("a"); String submittedB = Greenfoot.isKeyDown("b"); String submittedC = Greenfoot.isKeyDown("c"); String submittedD = Greenfoot.isKeyDown("d"); if ((submittedA || submittedB || submittedC || submittedD) = true) { if (submittedA = true) { userAnswer = "a"; if (userAnswer == data[instance][5] { correctlyAnswered++; } if (submittedB = true) { userAnswer = "b"; if (userAnswer == data[instance][5] { correctlyAnswered++; } if (submittedC = true) { userAnswer = "c"; if (userAnswer == data[instance][5] { correctlyAnswered++; } if (submittedD = true) { userAnswer = "d"; if (userAnswer == data[instance][5] { correctlyAnswered++; }
String key = Greenfoot.getKey(); if (key == null) return; if (key.equals(data[instance][5])) correctlyAnswered++;