// Program to compute a student's overall score in cse142 given their homework // scores and exam scores. public class OverallScore { public static void main(String[] args) { // hw1=8/10, hw2=14/16, hw3-8 = 18/20, section=18/18 int totalPoints = 10 + 16 + 6 * 20 + 18; int actualPoints = 8 + 14 + 6 * 18 + 18; double hwScore = 100.0 * actualPoints / totalPoints; int mid = 81; int fin = 74; double overall = 0.45 * hwScore + 0.2 * mid + 0.35 * fin; System.out.println("overall = " + overall); } }