Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write the program named Lab06.java that contains the following four static methods: public static double max(double[] data) that returns the maximum value in the array

write the program named Lab06.java that contains the following four static methods:

public static double max(double[] data) that returns the maximum value in the array data

public static double min(double[] data) that returns the minimum value in the array data

public static double sum(double[] data) that sums all items in the array and return the result

public static double ave(double[] data) that call the sum() method and then return the average.

Once you have completed the methods above, write a simple main program that does the following:

1. Asks the user how many items will be entered

2. Creates an array of double of the correct size

3. Prompts the user and reads in the values

4. Calculates and prints out the max, min, sum, and average using the methods above.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions