Hello ,
basically i want to write a program to compare 2 answer like the first line is the answer key and all the other lines are the students Id , and answer
like so :
TFTFTFTFTFTFTFTFTFTF 6185 TFTFTFTFTFTF FTFT TF 64551 TFFTFTTTTTTFFTFTTTTTF
I know how to put the answer key in a array but do not know how to compare it the all of the other students response also a right answer is +2 , wrong -1 , and blank 0 .
I know how to write the program but do not know how to to compare I thought about using a if else statement then I realize it was a bad idea , the answer key might change and the result will not be accurate ; and would like to use a array , that what I had .
if (studentsAnswers[1].charAt(0) == 'F' ){ counter0 = counter0 + 1; }else{ if (studentAnswers[1].charAt(1) == 'T'){ counter1++; }else{ } if (studentsAnswers[1].charAt(2) == FT'){ counter2++; }else{ }
I really need some help here guys If someone can help me please do .
Thanks a lot