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
Write a Java program to display a letter grade based on an actual grade. A =...
Write a Java program to display a letter grade based on an actual grade. A = 90-100 B = 80-89 C = 70-79 D = 60-69 F = less than 60 The program needs to do the following: 1. Create a short integer to store a grade. (See Week 3 - Things to Know - Java Data Types ) 2. Prompt for a grade ( 0-100). 3. Based on the grade given, use IF statements to display the letter grade...
Write a Java program to display a letter grade based on an actual grade. USING ECLIPSE...
Write a Java program to display a letter grade based on an actual grade. USING ECLIPSE IDE A = 90-100 B = 80-89 C = 70-79 D = 60-69 F = less than 60 The program needs to do the following: 1. Create a short integer to store a grade. (See Week 3 - Things to Know - Java Data Types ) 2. Prompt for a grade ( 0-100). 3. Based on the grade given, use IF statements to display...
-- 3. Create a variable to store a numeric grade -- Write a CASE statement that...
-- 3. Create a variable to store a numeric grade -- Write a CASE statement that uses the variable to calculate a letter grade -- If the numeric grade is above 100 or below 0, return "Invalid grade" -- A = 90-100, B = 80-89, C = 70-79, D = 60-69, F = 0-59 -- Hint: SELECT doesn't always require a FROM clause
Java: A teacher has five students who have taken four tests. The teacher uses the following...
Java: A teacher has five students who have taken four tests. The teacher uses the following grading scale to assign a letter grade to a student, based on the average of his or her four test scores: Test Score Letter Grade 90–100 A 80–89 B 70–79 C 60–69 D 0–59 F Write a class that uses a String array (or an ArrayList object) to hold the five students’ names, an array of five characters to hold the five students’ letter...
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...
have a java application need to create an application which is able to do some analysis...
have a java application need to create an application which is able to do some analysis on temperature data stored in a data file. You will be given the “temperatures.dat” data file which contains the data you must analyze. The analysis you’ll need to do is: Total number of data points Find coldest temperature Find warmest temperature Find average temperature Find the frequency of each temperature Find the most frequent temperature Find the least frequent temperature All classes must be...
You are to write a program that will process students and their grades. For each student...
You are to write a program that will process students and their grades. For each student the program will read in a student’s name. It should also read in 10 test scores for the student and calculate his or her average. You must read the scores using a loop. The program should output the student’s name, average and letter grade. The average should be displayed accurate to 1 decimal digit. Letter grades are assigned based on the scale: 90-100    A...
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...
Implement the following functions in the given code: def random_suit_number(): def get_card_suit_string_from_number(n): def random_value_number(): def get_card_value_string_from_number(n):...
Implement the following functions in the given code: def random_suit_number(): def get_card_suit_string_from_number(n): def random_value_number(): def get_card_value_string_from_number(n): def is_leap_year(year): def get_letter_grade_version_1(x): def get_letter_grade_version_2(x): def get_letter_grade_version_3(x): Pay careful attention to the three different versions of the number-grade-to-letter-grade functions. Their behaviors are subtly different. Use the function descriptions provided in the code to replace the pass keyword with the necessary code. Remember: Parameters contain values that are passed in by the caller. You will need to make use of the parameters that each...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT