Computing Adjusted Quiz Total Score Main Algorithm 1


![Java Code public class Total. Adjusted. Quiz. Score { public static void main(String[] args) Java Code public class Total. Adjusted. Quiz. Score { public static void main(String[] args)](https://slidetodoc.com/presentation_image_h2/3675e0a76a0c78768a5379368bdf3b94/image-3.jpg)
![Java Code Expanded public class Total. Adjusted. Quiz. Score { public static void main(String[] Java Code Expanded public class Total. Adjusted. Quiz. Score { public static void main(String[]](https://slidetodoc.com/presentation_image_h2/3675e0a76a0c78768a5379368bdf3b94/image-4.jpg)

![Java Code Expanded (Cont’d) public static int[] add. Arrays(int[] a, int[] b, int n) Java Code Expanded (Cont’d) public static int[] add. Arrays(int[] a, int[] b, int n)](https://slidetodoc.com/presentation_image_h2/3675e0a76a0c78768a5379368bdf3b94/image-6.jpg)
- Slides: 6

Computing Adjusted Quiz Total Score

Main Algorithm 1. Get 12 quiz scores 2. Get 12 adjustment values 3. Compute 12 adjusted scores by adding the corresponding adjustment value to each score 4. Compute the sum of the two lowest adjusted scores 5. Compute the sum of the 12 adjusted scores 6. Compute the total adjusted quiz score by subtracting the sum of the two lowest adjusted scores from the sum of the 12 adjusted scores 7. Print the total adjusted quiz score
![Java Code public class Total Adjusted Quiz Score public static void mainString args Java Code public class Total. Adjusted. Quiz. Score { public static void main(String[] args)](https://slidetodoc.com/presentation_image_h2/3675e0a76a0c78768a5379368bdf3b94/image-3.jpg)
Java Code public class Total. Adjusted. Quiz. Score { public static void main(String[] args) { // Get 12 quiz scores // Get 12 adjustment values // Compute 12 adjusted scores by adding the // corresponding adjustment value to each score // Compute the sum of the two lowest adjusted scores // Compute the sum of the 12 adjusted scores // Compute the total quiz score by subtracting the // sum of the two lowest adjusted scores from the sum // of the 12 adjusted scores // Print the total quiz score } }
![Java Code Expanded public class Total Adjusted Quiz Score public static void mainString Java Code Expanded public class Total. Adjusted. Quiz. Score { public static void main(String[]](https://slidetodoc.com/presentation_image_h2/3675e0a76a0c78768a5379368bdf3b94/image-4.jpg)
Java Code Expanded public class Total. Adjusted. Quiz. Score { public static void main(String[] args) { // Get 12 quiz scores int[] score = {7, 6, 10, 9, 5, 4, 6, 7, 8, 5, 0, 8}; // Get 12 adjustment values int[] adjustment. Value = {1, 2, 0, 0, 0, 2, 1, 0, 1}; // Compute 12 adjusted scores by adding the // corresponding adjustment value to each score int [] adjusted. Score = add. Arrays(score, adjustment. Value, 12);

Java Code Expanded (Cont’d) // Compute the sum of the two lowest adjusted scores int sum. Two. Lowest = get. Sum. Of. Two. Lowest. Elements(adjusted. Score, 12); // Compute the sum of the 12 adjusted scores int sum. Adjusted. Scores = get. Sum. Of. Array. Elements(adjusted. Score, 12); // Compute the total quiz score by subtracting the // sum of the two lowest adjusted scores from the sum // of the 12 adjusted scores int total. Adjusted. Score = sum. Adjusted. Score - sum. Two. Lowest; // Print the total quiz score System. out. println("Total Adjusted Quiz Score = " + total. Adjusted. Score); }
![Java Code Expanded Contd public static int add Arraysint a int b int n Java Code Expanded (Cont’d) public static int[] add. Arrays(int[] a, int[] b, int n)](https://slidetodoc.com/presentation_image_h2/3675e0a76a0c78768a5379368bdf3b94/image-6.jpg)
Java Code Expanded (Cont’d) public static int[] add. Arrays(int[] a, int[] b, int n) { int[] c = {9, 10, 9, 5, 6, 7, 7, 10, 6, 0, 9}; return c; } public static int get. Sum. Of. Two. Lowest. Elements(int[] a, int n) { return 5; } public static int get. Sum. Of. Array. Elements(int[] a, int n) { return 85; } }