Question: java Object-Oriented Programming Assignment1 In this assignment, you should create a class named ArrayUtil with the following properties: - A public static method named reverse

java
java Object-Oriented Programming Assignment1 In this assignment, you should create a class
named "ArrayUtil" with the following properties: - A public static method named

Object-Oriented Programming Assignment1 In this assignment, you should create a class named "ArrayUtil" with the following properties: - A public static method named "reverse" takes an array of integers as an argument and returns a new array with the elements in reverse order - A public static method named "sum" takes an array of integers as an argument and returns their sum - A public static method named "average" takes an array of doubles as an argument and returns their average - A public static method named "max" takes an array of integers as an argument and returns the maximum value in the array - A public static method named "copyArray" takes an array of integers as an argument and returns a copy of the array (use built-in system copying array) - A public static generic method named "printArray" takes an array of objects as an argument and prints each element in the array Create a second class named "ArrayProcessor" with the following properties: - A private field named "intArray" is an Arraylist of Integers - A public method named "readArray" uses an input dialog box to prompt the user for a series of integers until the user enters a non-integer value. Each integer entered should be added to the intArray field. - A public method named "processArray" uses the methods of Arrayutil to do the following: Reverse the intArray and store the result in a new array Print the sum, average, and maximum value of the intArray using the methods of ArrayUtil Generate a random number between 1 and 100 using the Random class of the Math library and print it - Copy the intArray using the copyArray method of ArrayUtil and print the copy - Use the printArray method of ArrayUtil to print the original intArray and the copy Create a third class named "Main" In the main method of the class, create an instance of ArrayProcessor and use its readArray and processArray methods to prompt the user for input and process the resulting array. Notes: - Use warrper clasees instead of primitive types. - Don't use built in methods (you must create all methods), you can only use builtin methods in Copying arrays. Random numbers generation

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!