subject
Engineering, 05.05.2020 21:43 lawhornmakayla

Write a Java method that takes a one dimensional array of doubles as a parameter. The method returns the absolute difference between the sum of numbers lower than the value in the middle of the array and the sum of numbers higher or equal to the middle value. Write a program to test your method.

Note: When the array length is even, the middle value is the average of the two values in the middle.

Use the following arrays to test your program:

Case #1, the length of array is odd: [8.5 32.8 27.2 19.1 6.5 17.6 24.2 23.1 20.6 13.2 28.4 14.7 18.6], for this case your program should output: 29.30

Case #2, length of array is even: [8.5 32.8 6.2 19.1 15.5 17.6 12.2 3.2 28.4 14.7], for this case your program should output: 37.60

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 18:10
The mass flow rate of the fluid remains constant in all steady flow process. a)- true b)- false
Answers: 1
question
Engineering, 04.07.2019 18:10
Which from the following instrument is commonly used to detect the high pitch butzing sound in bearings? [clo4] a)-digital ultrasonic meter b)-infrared camera c)-spectroscopic d)-vibrometer
Answers: 2
question
Engineering, 04.07.2019 18:20
Vibration monitoring this technique uses the noise or vibration created by mechanical equipment and in seme cases by plant systems to detemine their actual condtion. a)- true b)- false
Answers: 2
question
Engineering, 04.07.2019 18:20
Atank with constant volume contains 2.27 kg of a mixture of water phases (liquid-vapor). in the initial state the temperature and the quality are 127 Β°c and 0.6, respectively. the mixture is heated until the temperature of 160 oc is reached. illustrate the process in a t-v diagram. then, determine (1) the mass of the vapor in kg at the initial state, (2) the final pressure in kpa.
Answers: 3
You know the right answer?
Write a Java method that takes a one dimensional array of doubles as a parameter. The method returns...
Questions
question
Mathematics, 12.03.2021 22:30
question
Advanced Placement (AP), 12.03.2021 22:30
question
Mathematics, 12.03.2021 22:30
question
Mathematics, 12.03.2021 22:30
question
Mathematics, 12.03.2021 22:30
question
Mathematics, 12.03.2021 22:30
Questions on the website: 13722363