Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Using Visual Studios - C# and .NET Write a program that includes an ArrayStats class as described below (you need to write the class and

Using Visual Studios - C# and .NET

image text in transcribed

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions