Question: Write a program to read a list of test scores given as floating point percentages in the range 0.0 to 100.0. You will not be

Write a program to read a list of test scores given as floating point percentages in the range 0.0 to 100.0. You will not be using a data structure to store these data items. You will not be using a data class to store these data items. You may write the processing for this in the main() method. You may use the technique of assigning highest and lowest grades to literals as demonstrated in today's class (please realize that this will not always be the case).

Determine and display

  • the total number of A's (90 - 100), B's (80 - 89), C's (70 - 79), D's (60 - 69) and F's (59 and below)
  • the total number of grades (you will need a counter!)
  • the overall average grade
  • the lowest grade
  • the highest grade

use this data file: grades.txt

For example if the input is :

22 55 66 77 88 100 34 98

The output would be

Total number of grades : 8

Number of A's : 2

Number of B's: 1

Number of C's : 1

Number of D's : 1

Number of F's : 3

Overall average grade : 67.50

Lowest grade : 22

Highest grade : 100

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!