Third lab: Grades

27 Jan 2022 - 15:38 | Version 1 |

Learning Objective(s)

  1. Understand loops
  2. Be able to count things
  3. 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.
  1. The program should be called Grades
  2. 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
  3. 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.
  4. Sample input
78.5
65.2
53
105
-5
95
-999
  1. Sample Output
1 A
0 B
1 C
1 D
1 F
2 Bad
Average is 72.925

Submission

  1. Create an empty zip folder.
  2. Place your program (.java file) in it
  3. Place your software development report in it.
  4. 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.
  1. Use a switch statement with at most 10 different values across all case statements
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
This website is using cookies. More info. That's Fine