Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need help understanding how to make the following program (see specs below) please use basic beginner level code so I can understand Progizo specs. Grades

need help understanding how to make the following program (see specs below) please use basic beginner level code so I can understandimage


Progizo specs. Grades Write a class called Grades. Grades must have a main method (see example of what the main method does below). Grades are numbers between 0 and 10 (both zero and 10 included). They can have decimals. For example: 0, 10, 5.67, 8.2 are all valid grades. Implement a program such that, it asks the user for a grade, and then it prints the corresponding letter. If the user enters a grade lower than zero or higher than 10, print an error message (as in example below). Use the following data for your program: score higher than 100: report ERROR A 93-100 A- 90-92.9 B+ 87-89.9 B 83-86.9 B- 80-82.9 C+ 77-79.9 C 73-76.9 C- 70-72.9 F 0-69.9 score lower than 0: report ERROR Use if, do not use case. In general DO NOT USE ANYTHING WE HAVE NOT COVERERED Examples: here are some examples. Every time you see "java Grades" below it means the user is running the program again. Every time the program runs it reads ONE score and prints ONE letter grade. The percent character (%) is the prompt of my shell, yours may be different. % java Grades enter a number grade: 100.1 ERROR % % java Grades enter a number grade: 100 A % % java Grades enter a number grade: 94.8 A % % java Grades enter a number grade: 93 A % % java Grades enter a number grade: 92.9 A- % % java Grades enter a number grade: 90.5 A- % % java Grades enter a number grade: 84.7 B % % java Grades enter a number grade: 76.9 % java Grades enter a number grade: -1 ERROR % Progizo specs. Grades Write a class called Grades. Grades must have a main method (see example of what the main method does below). Grades are numbers between 0 and 10 (both zero and 10 included). They can have decimals. For example: 0, 10, 5.67, 8.2 are all valid grades. Implement a program such that, it asks the user for a grade, and then it prints the corresponding letter. If the user enters a grade lower than zero or higher than 10, print an error message (as in example below). Use the following data for your program: score higher than 100: report ERROR A 93-100 A- 90-92.9 B+ 87-89.9 B 83-86.9 B- 80-82.9 C+ 77-79.9 C 73-76.9 C- 70-72.9 F 0-69.9 score lower than 0: report ERROR Use if, do not use case. In general DO NOT USE ANYTHING WE HAVE NOT COVERERED Examples: here are some examples. Every time you see "java Grades" below it means the user is running the program again. Every time the program runs it reads ONE score and prints ONE letter grade. The percent character (%) is the prompt of my shell, yours may be different. % java Grades enter a number grade: 100.1 ERROR % % java Grades enter a number grade: 100 A % % java Grades enter a number grade: 94.8 A % % java Grades enter a number grade: 93 A % % java Grades enter a number grade: 92.9 A- % % java Grades enter a number grade: 90.5 A- % % java Grades enter a number grade: 84.7 B % % java Grades enter a number grade: 76.9 % java Grades enter a number grade: -1 ERROR %

Step by Step Solution

3.40 Rating (156 Votes )

There are 3 Steps involved in it

Step: 1

import javautilScanner This imports the Scanner class which allows us to get user input public class Grades This defines the class name which should m... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals of Financial Accounting

Authors: Fred Phillips, Robert Libby, Patricia Libby

5th edition

78025915, 978-1259115400, 1259115402, 978-0078025914

More Books

Students also viewed these Programming questions