Question: Write a java application ArrayOperations that includes the following methods: SumArray : void method that accepts an array as a parameter and calculate the sum
Write a java application ArrayOperations that includes the following methods:
- SumArray: void method that accepts an array as a parameter and calculate the sum of all values. (2 marks)
- DiplayForward: void method that accepts an array as a parameter and prints the elements of that array in forward order. (2 marks)
- DiplayBackward: void method that accepts an array as a parameter and prints the elements of that array in backward order. (2 marks)
- MaxArray method that accepts an array as a parameter and returns the largest number. (2 marks)
- MinArray method that accepts an array as a parameter and returns the smallest number. (2 marks)
- AddElementFront method that accepts an array of characters and a character value as parameters, inserts the element at the beginning of the new array and copy the original array to the new one, and return the new array. (4 marks)
- Main method that tests all the previous 6 methods. (6 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
