Third lab: Grades
Learning Objective(s)
- Understand loops
- Be able to count things
- Be able to compute an average
Overview of the program
This lab does simple statistics about grades.
Specifics
This lab needs to count distributions of letter grades and compute an average.
- The program should be called Grades
- Data inputted:
- The data will be a series of grades (floating point allowed).
- The number of grades inputted is not known. However any number <= -999 will signal the end of the input.
- Any grade < 0 or > 100 is considered a bad grade and should not be included in the average
- What should be computed and outputted
- The number of A,'s, B',s C', D', and F's should be computed and outputted.
- F is < 60,
- 60 <= D < 70
- 70 <= C < 80
- 80 <= B < 90
- 90 <= A <= 100
- The number of bad grades should be counted and outputted.
- The average of all valid grades to be computed and outputted.
- Sample input
78.5
65.2
53
105
-5
95
-999
- Sample Output
1 A
0 B
1 C
1 D
1 F
2 Bad
Average is 72.925
Submission
- Create an empty zip folder.
- Place your program (.java file) in it
- Place your software development report in it.
- Submit the zip folder on canvas
Optional improvements
Optional improvements should ONLY be worked on once the program is completing working. In addition, the work is to be done on your own with little if any help for lab assistants or the instructor.
- Use a switch statement with at most 10 different values across all case statements