Question: Given two integer arrays a and b, the SuperSum is the sum of every product produced by multiplying each value from a by each value
Given two integer arrays a and b, the SuperSum is the sum of every product produced by multiplying each value from a by each value from b. Write the Java method displaySuperSumCalc that takes two integer arrays and displays one line to the screen showing how each product is computed, how they are summed together, and what the SuperSum is exactly as shown in the examples below.
| Array x | Array y | Exact screen output from displaySuperSumCalc(x, y) |
| 5 | 3 2 | 5*3 + 5*2 = 25 |
| 28 13 10 | 15 | 28*15 + 13*15 + 10*15 = 765 |
| 1 2 | 6 8 7 9 | 1*6 + 1*8 + 1*7 + 1*9 + 2*6 + 2*8 + 2*7 + 2*9 = 90 |
-------------------------------------------------------------------------------------------------------
public static void displaySuperSumCalc (int [] a, int [] b) {
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
