Explore BrainMass

A java program to calculate grades

Write a java application that accomplishes the following tasks (similar to the program assignment we did in CSC212 yet with built in exception handling):

1) Ask the number of homework assignment students have submitted in a semester

2) Calculate the letter grade the student has earned based on the average of these assignments.


1) Assume the full score for each assignment is 100. Student will get 0 for each unsubmitted assignment.

2) Student's letter grade is based on the average of all their assignments

90 -- 100 A

80 -- 89 B

70 -- 79 C

60 -- 69 D

0 -- 60 F

3) The program needs to have built in Exception handling.

After you are done, zip the source file along with screen shot of the output and send

Solution Preview

This solution has three parts. The first part prompts the user for
input and reads in the grade data. This is done by first prompting
the user for the number of grades and then using a for loop to
repeatedly ask for the scores. As each score is entered a running
total is calculated so that we can generate the average score. The
following code illustrates this.

System.out.print("How many homework ...

Solution Summary

This solution shows a Java program that calculates a student's grades. It demonstrates good programming structure and provides a detailed explanation of what the program is doing.