Question: Write a switch statement to convert a letter grade into an equivalent numeric value on a fourpoint scale. Set the value of the variable gradeValue

Write a switch statement to convert a letter grade into an equivalent numeric value on a fourpoint scale. Set the value of the variable gradeValue to 4.0 for an A, 3.0 for a B, 2.0 for a C, 1.0 for a D, and 0.0 for an F. For any other letter, set the value to 0.0 and display an error message.

Step by Step Solution

3.50 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

switchletter case A gradeValue 40 break case ... View full answer

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 Java An Introduction to Problem Solving and Progra Questions!