Question: JAVA Write a well-commented Java program that will create a grade calculator for math class. The program should prompt the user to enter grades for
JAVA
"Write a" well-commented Java program that will create a grade calculator for math class. The program should prompt the user to enter grades for various assessments items and will give them their current score, and what they would need to get on the final to get an A (>= 90%), B (>= 80%), C (>= 70), D (>= 60), or F (< 60) in the class. Look at the syllabus for percentage breakdowns. Prompt and accept the following inputs from the user:
1. Accept the name of the student.
2. If the file with name of the student exists, then read information from the file except calculated final e xam grade and store the values in appropriate data structures (arrays, linked lists, and/or objects). Jump to step 10. Otherwise, continue to step 3.
3. Accept 6 valid quiz scores entered as space or comma separated values. Check once for the validity of all the scores entered. Prompt the user to enter valid scores, till valid scores are entered. Accept 6 valid quiz scores from the user. The maximum score for each of the quiz is 10.
4. Accept 5 valid scores for homework assignments. For each of the scores entered, check for the validity of the scores entered. Prompt the user to enter valid scores, till valid scores are entered. Accept 5 valid assignment scores from the user. The maximum score for each of the assignments is 50, 75, 100, 125, and 150.
5. Accept 3 valid scores for e xams (exa m 1, exa m 2, and exa m 3). The maximum scores for each of the e xams are 120, 100, and 125. Ensure the validity of accepted grades. Prompt the user to enter valid scores, till valid scores are entered.
6. Accept 2 valid scores for student engagement in CS. The maximum score for each of the items is 100.
7. Accept 1 valid score for class participation and/or attendance. The maximum possible score is 100.
8. Calculate the average quiz score with the lowest score dropped.
9. Calculate the average homework assignment score with a maximum of 100%. Print the calculated current score.
10. Prompt the user to enter the anticipated grade among A, B, or C. If any other alphabet is entered, prompt the user to re-enter the valid anticipated grade. Calculate the score needed on the final exa m out of 150 for the user to receive their anticipated grade.
11. Write the grades of all assessment items and the calculated final exa m grade to a file (with name of the file LastName_FirstName.txt)
12. After printing the final exa m score, prompt the user to decide whether they want to reenter all the scores for another student. If user enters "yes", then repeat steps 1 through 7.
Please ensure that the program does not crash when an invalid input is entered. Design the entire program by decomposing various tasks into methods so that the program can be modified easily to add or remove functionality
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
