|ITEC 120 LAB 5||Back to Lab index page|
Amazing grade averager
You will write Java program that will average 3 grades input by the user.
You will use the Keyboard class for this project. Download it and put it in a folder called cs1, which needs to be in the same directory as you .java file.
First, your program will ask the user to input what kind of assignment they will be entering grades for. (for example, they might enter test or report or project or quiz). Read this information as a String.
Your program will then prompt the user for 3 of those grades. Read the grades as integers.
Next, your program will average the three grades together, and output that number to one decimal place. (Use the DecimalFormat class to achieve this.)Sample run:
Welcome to the amazing grade
|Program outputs:||Please enter your score for test number 1:|
|Program outputs:||Please enter your score for test number 2:|
|Program outputs:||Please enter your score for test number 3:|
Once you have your program working, show your lab to the Peer Instructor to be checked off. You'll run your program a couple times for the Peer Instructor.