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

Please help I have been trying to figure this problem all day with no success an

ID: 664564 • Letter: P

Question

Please help I have been trying to figure this problem all day with no success and all the answers on here are incorrect. If you answer the problem correctly I will give you five stars *****. Thank you

"""The history teacher at your school needs help in grading a True/False test. The students' IDs and test answers are stored in a file. The first entry in the file contains answers to the test in the form:

TFFTFFTTTTFFTFTFTFTT

Every other entry in the file is the student ID, followed by a blank, followed by the student's responses. For example, the entry...

ABC54301 TFTFTFTT TFTFTFFTTFT

indicates that the student ID is ABC54301 and the answer to question 1 is True, the answer to question 2 is False, and so on. This student did not answer question 9. The exam has 20 questions, and the class has more than 150 students. Each correct answer is awarded two points, each wrong answer gets one point deducted, and no answer gets zero points. Write a program that processes the test data. The output should be the student's ID, followed by the answers, followed by the test score, followed by the test grade.
Assume the following grade scale: 90%-100%, A; 80%-89.99%, B; 70%-79.99%, C; 60%-69.99%, D; 0%-59.99%, F."""

Explanation / Answer

import java.util.Scanner; public class Scorecard{ private static final int NUMSCORES=14; private String codes[] = {"0", "1", "2", "3", "4", "5", "6", "K3", "K4", "FH", "SS", "LS", "C", "Y"}; private String names[] = {"Error ", "Aces ", "Twos ", "Threes ", "Fours ", "Fives ", "Sixes ", "3-of-a-kind ", "4-of-a-kind ", "Full House ", "Small Straight ", "Large Straight ", "Chance ", "Yahtzee "}; private boolean taken[]; private int scores[]; private int yahtzeeBonus = 0; Scorecard(){ taken = new boolean[NUMSCORES]; for (int i=0; i