Use Java please
The first class, NumberArraystatistics, needs to store an array of doubles as its instance variable. You should create three constructors for this class: a default constructor that creates an array of 5 default double values, a parameter constructor that accepts an array of doubles, and a parameter constructor that accepts an integer value, representing the length of the array, and creates an array based on that number. You will need to complete the following methods in the NumberArraystatistics class (you may assume that the instance variable array is not empty when writing these methods): - addAt Index - accepts two parameters: a double value to be added to the array and an index of where in that array should be located. The method will add the double value at that index (replacing what was already there not shifting!), and return nothing. - tostring - returns a String with the array contents in the form {1.0,4.0,5.0}. Note that there is a comma then a single space between each pair of elements, but there are no spaces/commas at the start/end, only curly braces. Make sure it has this form exactly. Note: Decimals do not have to be formatted to one decimal. - average - returns the arithmetic mean average of the numbers in the array as a double. This is found by dividing the sum of the numbers by the amount of numbers in the array (note: some values returned may be slightly inaccurate due to roundoff errors, but you do not have to worry about this right now). - range - returns a double found by subtracting the smallest number in the array from the largest number in the array. Note that the smallest and largest value could be anywhere in the array, not in the first and last positions. - SortStatus - returns an int which is equal to 1 if the array is sorted in increasing order (every number is greater than or equal to the previous number) 1 if it is sorted in decreasing order (every element is less than or equal to the previous number) 0 if it is not sorted If every element in the array is the same, then it is counted as being in increasing order