Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Q7: Write a program to input an double array, and then computes some simple statistics on that array. The program should have two user-defined methods to help you with the task.
public static void InputArray(double[] array, ref int n) public static double ComputeStats(double[] array, int n, ref double min, ref double max)
InputArray should be similar to Fill from Lab 4. ComputeStats is a bit more interesting. It should return the average of the numbers in the array using a return statement and the minimum and maximum values through the reference parameters min, and max respectively.
You must compute the average, minimum and maximum using a for loop (you are not permitted to use any built-in methods from the Array class. The average, minimum and maximum are to be outputted from the Main method. You can assume that the maximum
number of values in the array will be 20. Add a loop to the Main method to allow the user to process more than one array if they so wish.
**** Note: On this assignment you can assume the correct datatype: that is, if the program requests a double, you can assume that the user will input a double, etc. You need to validate that the data entered is in the correct range.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91227407

Have any Question?


Related Questions in Computer Engineering

7 years ago crane corporation issued 20-year bonds that had

7 years ago Crane Corporation issued 20-year bonds that had a $1,000 face value, paid interest annually, and had a coupon rate of 7 percent. If the market rate of interest is 5.5 percent today, what is the current market ...

You are studying the number of defective parts produced

You are studying the number of defective parts produced each week by several machines to help adjust maintenance protocols. Assume the rows of matrix Def represent different machines and all columns except the last repre ...

Design a moore machine where the output y goes high 1 when

Design a Moore machine where the output Y goes high (=1) when the last four bits of the input X were 1110: 4th to last bit seen = 1 3rd to last bit seen = 1 2nd to last bit seen = 1 Last bit seen = 0 Your machine must be ...

String loop method write a java program to meet the

((String + Loop + method) Write a Java program to meet the following requirements: 1. Prompt the user to enter three strings by using nextline(). Space can be part of the string. 2. Write a method with an input variable ...

Requirementsdesign and implement an application with a

Requirements Design and implement an application with a graphical user interface to manage a library of songs. A song is uniquely identified by name and artist (case insensitive). Your application should have a SINGLE WI ...

Define risk and explain why this concept is important to

Define risk and explain why this concept is important to small business managers.

Question you work for a multi-state company with three

Question: You work for a multi-state company with three sites in three different states, 1,000 employees, an ERP application with a backend database, and two datacenters. Prepare a 2 Page Disaster Recovery and Business C ...

A swimmer is an athlete any athlete who participated in the

A swimmer is an athlete. Any athlete, who participated in the 2016 Summer Olympics and won a gold medal, was joyful. Any athlete, who is the world top athlete or a selected well-trained athlete, participated in the 2016 ...

Is it ethical for facebook to mine its users posts for

Is it ethical for Facebook to mine its users' posts for signals that those users are about to go through a break up? Is it ethical for the company to then help its clients target their ads based on this research? Is what ...

Prove the sieve of eratosthenes algorithm has runtime

Prove the Sieve of Eratosthenes algorithm has runtime complexity ≤ O(n log log n). Sieve Input: an integer n > 1. Let A be an array of Boolean values, indexed by integers 2 to n, initially all set to true. for i = 2,3,4, ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As