@@ -0,0 +1,1018 @@
+import java.util.Arrays;%0A%0Apublic class GradeCalculator %7B%0A%09private static final double WEIGHT = 0.2;%0A%09private static final double TOTAL = 75;%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09double%5B%5D projects = %7B100.0, 100.0, 96%7D;%0A%09%09double%5B%5D homeworks = %7B97.7, 94%7D;%0A%09%09double%5B%5D quizzes = %7B87.5, 93.4, 95%7D;%0A%09%09double midterm = 89.8;%0A%09%09double homeworkWeight = 0.15;%0A%0A%09%09System.out.println(%22Grade is: %22 + (weightedAverage(projects) + weightedAverage(homeworks, homeworkWeight) + weightedAverage(quizzes) + weighted(midterm)) / TOTAL);%0A%09%7D%0A%0A%0A%0A%09private static double weighted(double grade) %7B%0A%09%09return grade * WEIGHT;%09%0A%09%7D%0A%09private static double weighted(double grade, double weight) %7B%0A%09%09return grade * weight;%0A%09%7D%0A%0A%09private static double weightedAverage(double%5B%5D grades) %7B%0A%09%09return average(grades) * WEIGHT;%0A%09%7D%0A%09private static double weightedAverage(double%5B%5D grades, double weight) %7B%0A%09%09return average(grades) * weight;%0A%09%7D%0A%0A%09private static double average(double%5B%5D grades) %7B%0A%09%09return Arrays.stream(grades).average().getAsDouble();%0A%09%7D%0A%7D%0A

Create GradeCalculator.java