ITEC 120 LAB 6 Back to Lab index page

Make the grade

You will write Java program that will ask the user to enter a grade (integer between 0 and 100). You then will tell them what their letter grade is. Assume this is for a school that gives + and - grades:

A+
97-100
A
93-96
A-
90-92
B+
87-89
B
83-86
B-
80-82
C+
77-79
C
73-76
C-
70-72
D+
67-69
D
63-66
D-
60-62
F
59 and below

Sample run:
Program outputs:

Please enter a grade:

User inputs: 84
Program outputs:

84 is a B.


Sample run #2:
Program outputs:

Please enter a grade:

User inputs: 79
Program outputs:

79 is a C+.

Notes: You'll use conditional statements in this program. There are many ways to write this program, some more effiecient than others, some more understandable than others. Notice that there is no such thing as an F+ or F-.

You will use the Keyboard class for this assignment. Make sure the Keyboard.class file is in a folder called cs1 in the same directory as your .java file.

Once you have your program working, show your lab to the Peer Instructor to be checked off. The Peer Instructor will run the program.