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:
- reverseArray method that accepts an array as parameter, reverse an array in place and return the reversed array. (4 marks)
- 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)
- 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)
- 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)
- 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
