Professional Documents
Culture Documents
Grade Calculator
Grade Calculator
java
1
2
3 import java.util.Scanner;
4
5
6 /**
7
8 * GradeCalculator "description"
"description
9
10
* @author John Leonard Gomez
11 * @since Jan 24, 2024
12
13 * @instructor John Gomez
14
*/
15
16 public class GradeCalculator
17
18
19 {
20
21 public static void main(String
(String args[])
22
{
23
24 final double HW = 0.20;
25
26
final double EXAMS = 0.50;
27 final double PROJ = 0.30;
28
29
30
Scanner userInput = new Scanner(System.in);
Scanner(System.
System.out.println("Enter
System. .println("Enter student's \"Total Exams\" score: ");
double eScore = userInput.nextInt();
double eComp = Math.round((((eScore
Math. ((((eScore / 100)*100.0)*EXAMS)*100)/100.0;
System.out.println(eComp
System. .println(eComp + "% of the final grade.");
System.out.println("-----------------------------------------------------");
System. .println("-----------------------------------------------------");
System.out.println("Enter
System. .println("Enter student's \"Total Projects\" score: ");
double pScore = userInput.nextInt();
double pComp = Math.round((((pScore
Math. ((((pScore / 60)*100.0)*PROJ)*100)/100.0;
System.out.println(pComp
System. .println(pComp + "% of the final grade.");
System.out.println("-----------------------------------------------------");
System. .println("-----------------------------------------------------");
System.out.println("-----------------------------------------------------");
System. .println("-----------------------------------------------------");
double total = hwComp+eComp+pComp;
System.out.println("MIA
System. .println("MIA COOK'S Grade is " + total +"%.");