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:

  1. SumArray: void method that accepts an array as a parameter and calculate the sum of all values. (2 marks)
  2. DiplayForward: void method that accepts an array as a parameter and prints the elements of that array in forward order. (2 marks)
  3. DiplayBackward: void method that accepts an array as a parameter and prints the elements of that array in backward order. (2 marks)
  4. MaxArray method that accepts an array as a parameter and returns the largest number. (2 marks)
  5. MinArray method that accepts an array as a parameter and returns the smallest number. (2 marks)
  6. 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)
  7. 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 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!