forked from laviy/Midterm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGrader.java
More file actions
32 lines (28 loc) · 929 Bytes
/
Copy pathGrader.java
File metadata and controls
32 lines (28 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* Calculates the grade a student receives on an examination
*
* The program first prompts the user to enter the number of points possible
* on the exam. Then, the program prompts for the number of items missed; if a positive
* number is entered, the program responds by calculating and displaying the percentage
* score out of 100. If a negative number is entered, the program prints a "Thank You" message
* and exits.
*
* A sample interaction might be: (user input marked with '>')
* "Enter the number of items on the exam"
* >25
* "Enter the number of items missed"
* >3.5
* "Missing 3.5 results in a score of 86.0"
* "Enter the number of items missed"
* >0
* "Missing 0 results in a score of 100.0"
* "Enter the number of items missed"
* >-100
* "Thank you -- have a great day!"
*
*/
public class Grader {
public static void main(String[] args) {
//TODO insert your code here
}
}