Question: please help I have been trying to get this for some time now and would love some help on this. Create a Java program that

please help I have been trying to get this for some time now and would love some help on this.

Create a Java program that inputs a grade from the user. The grade input from the user will be an integer. Once the input is stored, use an if-else-if block of code to determine the letter grade of the inputted integer grade. Do not use a bunch of if statements by themselves to solve this problem. You will print an error message for inputs greater than 100 and for inputs less than 0. Both errors must be handled together by a compound conditional statement that is joined by a short circuit AND or OR operator. Assign your error message to a String variable and use that variable in a System.out.println statement to print the error. You must assign a char variable for each letter grade. Use System.out.printf to print the letter grade.

Run your program several times using these inputs and ensure that you are receiving these outputs:

  • input: 140
    • expected output: ERROR - You have entered an invalid input.
  • Input: -45
    • expected output: ERROR - You have entered an invalid input.
  • input: 82
    • expected output: You have earned the letter grade B

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!