Question: 1. write a class and name it ArrayOpsThe class will have: a. One static method named main. b. One instance field named data of type

 1. write a class and name it ArrayOpsThe class will have:
a. One static method named main. b. One instance field named data

1. write a class and name it ArrayOpsThe class will have: a. One static method named main. b. One instance field named data of type integer array c. Write one constructor called ArrayOps with one argument: an array. Make a deep copy of the array Three instance methods: toString, reverse and findMin d. 2. There will be one static method named "main" (as in all the previous lab assignments). Copy and past the main method given here into your class: public static void main( String [] args) int [] input { , 1, -2, -3, 4, 5, -6, -7, 8, 9 }; Arrayops testobj = new Arrayops( input ); // constructor System.out println( "nobject's index for the smallest value is: + testobj.findMin)"n" // 1. Reference the tostring-method and print the array. /1 2. Reference the reverse-method to the array order // 3. Reference the tostring-method to display the reversed /Iarray /1 4. Reference the findMin-method to return the index of // the smallest value stored in the reversed array: // int mindex=? System.out.println( "Inobject's index for the smallest value after reverse is: " + mindex "; 3. Create a private instance field named data of type int-array in your class. . Write the constructor ArrayOps with one argument. Use the input argument to create a deep copy of the input array. The variable name "data" is the reference to the deep copy write a method called toString. This method has formal parameter inputs and returns a String. The returned string will contain the values in the instance field array as a String. 5

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!