Question: Object Array English its java, sorry about that it's a java program, requires we create object array of type string. the question are all together.

 Object Array English its java, sorry about that it's a java

program, requires we create object array of type string. the question are

Object Array

English

its java, sorry about that

it's a java program, requires we create object array of type string. the question are all together.

Define the class Vector that includes the following members: A private instance variable named value of type double[] (A reference variable that refers to an array of doubles). A no-arg constructor that creates an array (object) of 5 doubles referred to by the instance variable value. A constructor that takes an array of strings. The elements of the taken array are parsed and assigned to the elements of the instance variable value. The first step is to create an array of integers which is referred to by the instance variable value. A constructor that takes two integer parameters. The first parameter is the size of the created array referenced by the instance variable value. All the elements of the array are initialized to the value of the second parameter. A constructor that takes an integer parameter. The parameter is the size of the created array referenced by the instance variable value. . A getter and setter methods of the instance getter method so that the returned ter methods of the instance data field value. The getter method will return a reference to the instance data field value. Therefore, the instance variable might be vulnerable to access and modification outside the class Vector. Implement the method so that the returned reference refers to a copy of the instance variable value rather on to the original object. The content of this object is accordingly protected. lie instance method named getSize that returns the size of the array referenced by the instance variable value. A public instance method named sum tha u sum that does not take any argument and returns the sum of the elements of the array referred to by the instance variable value. A public instance method named average that does not take any argument and returns the average of the elements of the array referred to by the instance variable value. A public instance method named pow that returns the sum of the squares of the elements of the array referred to by the instance variable value. A public instance method named centralize that takes no argument and returns no value. The method subtracts the average of the array value from each element of the array value of this object. After centering, the average of the array value is equal to 0. A public instance method named normalize that takes no argument and returns no value. The method does the following: Compute the total power of the array (use the instance method pow) Divide every element of the array value by the square root of the obtained power in the previous step. A public static method named to Vector that takes an integer 2D array (of any dimensions) and returns a reference to a Vector object. The instance variable value of the returned object contains the non-zero elements of the taken 2D array. A public static method that takes an array of Vector objects an array of reference variables to Vector objects) and sort the array in a non-decreasing order based on the size of the instance variable value. A public instance method named print Vector that prints the elements of the instance variable value of this object Test the functionality of the class Vector

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!