Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please help me understand how to do this code in JAVA!! Can you please provide s

ID: 3798955 • Letter: P

Question

Please help me understand how to do this code in JAVA!! Can you please provide step by step instrucaitons on how to you did it.

These are the steps my TA told me to do it

1) get the key

2) get students (using while and arrays)

3) process quiz number

4) process each student(using something called sumscores)

5) print score

They aslo told me to use a thing called string.split("\st")

Anyways heres the assignment

Please and thank you!!

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- You are going to write a program to perform automated grading for True/False quiz. The first line of input will contain the quiz number followed by the answers to the quiz (T or F). The subsequent lines of input will contain the student's name (last, first), the student's ID (nine digits), followed by the student's answers to the quiz. Your program terminates processing student data when the string "ZZZZ" as the only data contained in the input. Your program will output the student's ID, the student's name (first last) and the score received for the quiz.

An example input to your program:

which will produce the output:

Error processing:

if the answer is neither a T/t or F/f it is considered incorrect.

if no students are in the class, your program will output:

Explanation / Answer

import java.io.*;
import java.text.*;
public class Quiz {

public static void main (String [] args) throws IOException

{

int quiz;

int count =0;

int Student_Total = 0;

int Class_Total = 0;

BufferedReader std_in = new BufferedReader (new InputStreamReader (System.in));

String[] key = std_in.readLine ().split (" +"); // code for input 1

String[] Student_Quiz = std_in.readLine ().split (" +"); //code for input 2

System.out.println ("Results for quiz 1: ");

while (Student_Quiz[0].compareToIgnoreCase("ZZZZ") != 0) //if input 2 is ZZZZ program terminates

{

counter ++;

Quiz = 0;

StudentTotal = 0;

for (int i = 0; i < key.length; i++)

{

if (Student_Quiz [3].compareToIgnoreCase (key [i]) ==0) // comparing input 2 to the key

StudentTotal ++;

Quiz ++;

}

Student_Quiz[0] = Student_Quiz[0].substring(0, Student_Quiz[0].length() - 1);

}

if (counter !=0)

System.out.println (counter);

else

System.out.println ("Quiz 1: Empty class data"); // if no student is entered this is printed out

}

}

Thank you