Question: Write a java application ArrayOperationsLab2 that includes the following methods: reverseArray method that accepts an array as parameter, reverse an array in place and return

Write a java application ArrayOperationsLab2 that includes the following methods:

  1. reverseArray method that accepts an array as parameter, reverse an array in place and return the reversed array. (4 marks)

  1. mergeArrays method that accepts two arrays as parameters, copy the first and second array to a new array, and return the new array. (4 marks)

  1. removeElement method that accepts an array and an integer value (index) as parameters, remove the element at that specific index and return the updated array. (4 marks)

  1. findReplace method that accepts an array, a value 1 and a value 2 as parameters, find value 1 and replace it by value 2 and print the updated array elements. (4 marks)

  1. Main method that tests all the previous 4 methods. (4 marks)

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!