Question: Write a program that represents a grade distribution for a given course. Write methods to perform the following tasks: -Read the number of each of
Write a program that represents a grade distribution for a given course. Write methods to perform the following tasks:
-Read the number of each of the letter grades A, B, C, D, and F.
-Return the percentage of each letter grade as a whole number between 0 and 100.
For example, if the grades are 1 A, 4 Bs, 6 Cs, 2 Ds, and 1 F, the total number of grades is 14, the percentage of each grade is:
A 7% B 29% C 43% D 14% F 7%
Include the algorithm in your code.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
