A scientist is running a simulation on rainfall data.
He has written a computer program which:
Here is the code.
Start a new project in your ide and copy in the Main.java code.
There are 1 or 2 errors. Can you find them and fix them?
Observation questions
Another function, getMinValue(), needs to be written. Code this function which returns the smallest value in the array.
Test that your function works as expected.
Another function, getTotalValue(), needs to be written. Code this function which returns the sum of all values in the array.
Test that your function works as expected.
Another function, getAverageValue(), needs to be written. Code this function which returns the average of all values in the array.
getAverageValue should call getTotalValue in order to determine and return the average value.
Test that your function works as expected.
Another function, evaluateData(), needs to be written.
This function takes 2 values as parameters. The first represents a minimum rainfall value.
The second represents the maximum rainfall value.
The function outputs Irregular data set if the difference between the two values is greater than 50; Otherwise it outputs Regular data set
Test that your function works as expected.
Design a function that will display the min, max, average and total values in the data array - do not use any additional global variables.
Write a program to test all of the functions available.