Question
Java Programming Prompt the user for a letter grade and store this in a char. Then, write a multi-way if statement that ends in a
Java Programming
Prompt the user for a letter grade and store this in a char. Then, write a multi-way "if" statement that ends in a catch-all if a non-existent letter grade (i.e., not A, B, C, D, F) is entered. The multi-way "if" asks: Is the grade an A? Else is the grade a B? Else is the grade a C? Else is the grade a D? Else is the grade an F? For each case, print an appropriate message to screen as to what letter grade was entered (or if a non-existent grade was entered). Notice the use of the word else in the sentence above, which provides for a more precise meaning. In spoken English we might use the word or instead, but of course, English is terribly ambiguous and Java needs to be discrete, deterministic, and precise.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started