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