Question: Given a variable grade of type char that has been given a value and a variable points of type int assign 4 to points if

Given a variable grade of type char that has been given a value and a variable points of type int assign 4 to points if grade is 'A'
or 'a',3 to points if grade is 'B' or 2 to points if grade is 'C' or 1 to points if grade is 'D' or 'd' or 'E' or 'e',0 to points if
grade is 'F or 'f' and -1 to points in any other case. Use a switch statement to make the assignments.
Use break appropriately to combine cases. That means you won't get credit if you used more than six assignment statements. Also
there should be no other code besides a switch statement. No if statements, for example and no code outside the switch
statement.
Additional Notes: grade should not be modifiedGiven a variable grade of type char that has been given a value and a variable points of type int assign 4 to points if grade is 'A'
or 'a',3 to points if grade is 'B' or 2 to points if grade is 'C' or 1 to points if grade is 'D' or 'd' or 'E' or O to points if
grade is 'F' or 'f' and -1 to points in any other case. Use a switch statement to make the assignments-
Use break appropriately to combine cases. That means you won't get credit if you used more than six assignment statements. Also
there should be no other code besides a switch statement. No if statements, for example and no code outside the switch
statement.
Additional Notes: grade should not be modified

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!