subject

Write a program that includes an ArrayStats class as described below (you need to write the class and its methods). The program should read a number from the keyboard (prompting for it accordingly), this number will indicate the size of an array of integers that the program needs to create. Then the program should use an instance of the Random class to store a random integer between 1 and 100 in each element of the array. The program should then print the array out (properly formatted) and use the ArrayStats class to find and print the smallest, the biggest, the mean, the median, the standard deviation and the range of the values in the array (difference between the biggest and the smallest). It should also print the number of times a method in the ArrayStats class was called in total. ArrayStats class should include the following static method: a) A method that accepts an array of integers and returns the smallest value b) A method that accepts an array of integers and returns the biggest value c) A method that accepts an array of integers and returns its mean d) A method that accepts an array of integers and returns its median e) A method that accepts an array of integers and returns its standard deviation And it should also keep a counter (static variable) which should be incremented every time a method of the class is called.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 21:30, dpazmembreno
Ajeweler designing a pin has decided to use five stones chosen from diamonds, rubies, and emeralds. in how many ways can the stones be selected?
Answers: 3
image
Computers and Technology, 22.06.2019 05:00, mathman783
Which two editions of windows 7 support 64 bit cpus? choose two out of professional, business, starter, or home premium.
Answers: 1
image
Computers and Technology, 22.06.2019 20:00, jayjay5246
What is the term for water wave that is created by an underwater earthquake
Answers: 1
image
Computers and Technology, 22.06.2019 21:00, jennifer7037
Ulia is planning to attend the same private four-year college her parents attended. she wants to save at least $18,000 in four years to contribute to her college education. which monthly deposit amounts can julia use to achieve her goal? check all that apply.
Answers: 2
You know the right answer?
Write a program that includes an ArrayStats class as described below (you need to write the class an...

Questions in other subjects:

Konu
Biology, 20.04.2020 15:39