Been trying to wrap my head around this logic, maybe you guys can point me in the right direction.
I have two String[], the one contains the Question Options, the other whether the option is correct or not.
Example:
String question = "Which of the following are fruit";
String[] questionOptions = "Mangos-Apples-Potatoes-Bananas".split("-");
String[] questionOptionsCorrect = "Y-Y-N-Y".split("-");
I am passing a List to my webservice, where each answerObject contains an option, and whether it is the correct option.
Example:
List< AnswerObjects > optionList = new ArrayList< AnswerObjects >();
answerObject.setAnswerText(Mangos);
answerObject.setAnswerCorrect(Y);
optionList.add(answerObject);
So my question is, How would I loop through the arrays and assign the right option and optionCorrect to each object.
Thanks anyone who's willing to help out.
AnswerObjectobjects, and how to put them in the list. That might lead you to the next step.