Project on Switch Statements: Converting from Letter to Numerical Grades

Write a program that takes an array of Strings called grades and calculates the average of the grades by doing the following translations:

Grade Numerical Equivalent

A 95
B 85
C 75
D 65
F 55

Use a for loop and a switch statement to iterate through the array of grades, add them all together and then divide by the number of grades to arrive at an average grade which should be printed in decimal form.

You may assume that the grades array is hard coded in your program and does not need to be read from a file. Use the following test case for your grades array:

private final String [] grades = { "A", "C", "C", "D", "B", "D", B };

1 point
I have completed the project(s) for this lesson and have demonstrated them to my instructor.