Question: Write, compile, and run a java program that prompts the user to enter two 33 matrices and displays their sum. Use the header of the

 Write, compile, and run a java program that prompts the user
to enter two 33 matrices and displays their sum. Use the header

Write, compile, and run a java program that prompts the user to enter two 33 matrices and displays their sum. Use the header of the method is as follows: public static double[D] addMatrix(double[D] a, double[D] b) .he questions and write your best answers. Q1. Write, compile, and run a Java program that fulfills the following tasks: a) Create a data type I-dimentional array to hold 30 elements. (8) Marks b) Ask the user to fill the created array. (1 Mark) c) Print the array elements. (1 Mark) d) Create a method print Fun that receives a double array (1 Mark) and returns the sum of all (negative and odd) elements. (1 Mark) e) Invoke the print Fun method and print the result. (1 Mark) f) Create another method print Fun that prints the mean. (2 Marks) Hints: The mean is the same as the average value of a series of numbers and is found using a calculation: Add up all of the numbers and divide by the number of numbers in the series. The mean is calculated as follows: mean =ni=1nxf, where n is numbers count

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!