Question

Create a Grade application that prompts the user for the percentage earned on a test or...

Create a Grade application that prompts the user for the percentage earned on a test or other graded work and then displays the corresponding letter grade. The application should use the grading scale at your school or the following grading scale:

90 – 100 A

80 – 89 B

70 – 79 C

60 – 69 D

below 60 F

The application output should look similar to:

Enter your marks: 90

Grade: A

Notes: coded in java.

Please don't make it too complicated so don't use keyboard coding or anything of that sort.

Make it as simple as possible because I am in a grade 11 comp sci course and we just started.

Homework Answers

Answer #1

Required code in java -->

import java.util.Scanner;
public class Main{
   public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter Percentage earned "); // Ask user for percentage earned
int marks = sc.nextInt(); // read input from user and store the value in marks
if(marks>=90 && marks<=100){ // if marks (90 -100)
System.out.println("Grade is : A"); // print A
}
else if(marks>=80 && marks<=89){ // if marks(80-89)
System.out.println("Grade is : B"); // print B
}
else if(marks>=70 && marks<=79){ // if marks 70-79
System.out.println("Grade is : C"); // print C
}
else if(marks>=60 && marks<=69){ // if marks 60-69
System.out.println("Grade is : D"); // print D
}
else{ // else
System.out.println("Grade is : F"); // print F
}
   }
}

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Create a Change application that prompts the user for an amount less than $1.00 and then...
Create a Change application that prompts the user for an amount less than $1.00 and then displays the minimum number of coins necessary to make the change. The change can be made up of quarters, dimes, nickels, and pennies. The application output should look similar to: Enter the change in cents: 212 The minimum number of coins is: Quarters: 8 Dimes: 1 Nickels 0 Pennies: 2 Must be coded in Java please
Create a DigitsSum application that prompts the user for a non-negative integer and then displays the...
Create a DigitsSum application that prompts the user for a non-negative integer and then displays the sum of the digits. ( Java Programming )
C++ Write a program which accepts a numeric test score from the user. It will output...
C++ Write a program which accepts a numeric test score from the user. It will output the letter grade to the user corresponding to the score. Assume no “minus grades” (an A ranges from 90-100, B ranges from 80-89, C ranges from 70-79, D ranges from 60-69 and F is everything else.) Ensure that the score remains in the range of 0 to 100. As an example of the output: Enter your numeric grade and I will tell you your...
Please note that for all problems in this course, the standard cut-off (alpha) for a test...
Please note that for all problems in this course, the standard cut-off (alpha) for a test of significance will be .05, and you always report the exact power unless SPSS output states p=.000 (you’d report p<.001). Also, remember when hand-calculating, always use TWO decimal places so that deductions in grading won’t be due to rounding differences. Problem Set 1: (22 pts) A teacher wanted to see if a new pedagogical approach was beneficial to students, and if the effects vary...
I've posted this question like 3 times now and I can't seem to find someone that...
I've posted this question like 3 times now and I can't seem to find someone that is able to answer it. Please can someone help me code this? Thank you!! Programming Project #4 – Programmer Jones and the Temple of Gloom Part 1 The stack data structure plays a pivotal role in the design of computer games. Any algorithm that requires the user to retrace their steps is a perfect candidate for using a stack. In this simple game you...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary rivals? How will the acquisition of Reebok by Adidas impact the structure of the athletic shoe industry? Is this likely to be favorable or unfavorable for New Balance? 2- What issues does New Balance management need to address? 3-What recommendations would you make to New Balance Management? What does New Balance need to do to continue to be successful? Should management continue to invest...