import java.util.*; // import java utilities to use scanner command for input public class question { //setup grades class for project public static Scanner console = new Scanner(System.in);// setup scanner for keyboard input public static int hww, exwo, exwt; // homework and exam one and two weights public static int numofassign, assignscore, assignmax; // number of assignments public static int numofsessions; // number of sessions public static int totpoints, whs, totmax; public static void main(String[] args) { //setup main method getweights (); //run getweights method below getnumassign (); // run getnumassign below getexaminfo (); //run getnumofsessions and test scroes below } public static void getweights() { // get homework and exam weights System.out.print ("Homework Weight :"); Scanner scanner=new Scanner(System.in); // get homework weight hww = console.nextInt(); // let hww = input for homework weight System.out.print ("Exam One Weight :"); // Get exam one weight exwo = console.nextInt(); // let exwo = input for exam one weight exwt = 100 - hww - exwo; // get exam weight two by subtracting homework weight and exam one weight from 100 System.out.println ("Exam Two Weight: " + exwt); // just prints exam two's weight to screen for reference } public static void getnumassign() { // get number of Homework assignments System.out.print ("Number of Assignments :"); numofassign = console.nextInt(); for (int x = 1; x <= numofassign; x++) { System.out.print ("Assignment " + x + " Score: "); assignscore = assignscore + console.nextInt(); System.out.print ("Assignment " + x + " Max: "); assignmax = assignmax + console.nextInt(); } } public static void getexaminfo() { System.out.print ("Sessions Attended: "); // Print to screen to get sissions attended numofsessions = console.nextInt(); // Input number of sessions attended totpoints = assignscore + (numofsessions * 4); // totpoints = assignment scores + number of session * 4 points for each session attended totmax = assignmax + 20; // totmax = total assignment max points + 20 System.out.println("Total Points: " + totpoints + " / " + totmax); // Print total points for total assignment points / total max points double whs = (double) (totpoints / totmax)* hww; System.out.println("Weighted Score: " + whs); // Weighted Score should by 40.63 } public static double round2(double number){ return Math.round(number * 100.0) / 100.0; } }