Objectives

This assignment should exercise procedural programming skills you learned in CPS150 working with arrays/array lists.

Array/Array List Operations

Write a menu-driven JAVA program that performs the following array/vector operations:

a) Reverse the sequence of elements in an array/array list.

For instance, if the array/array list contains 1 4 9 16 9 7 4 9 11, after choosing this option, the array/array list will contain 11 9 4 7 9 16 9 4 1.

b) Append one array/array list to another.

For instance, if a is 1 4 9 16 and b is 9 7 4 9 11, after choosing this option the following will be returned: 1 4 9 16 9 7 4 9 11

c) Merge two array/array list, alternating elements from both. If one is shorter than the other, append the remaining elements from the longer array/array list.

For instance, if a is 1 4 9 16 and b is 9 7 4 9 11, after choosing this option, the following will be returned: 1 9 4 7 9 4 16 9 11.

d) Remove duplicates from an aray/array list.

For instance, if the array/array list contains 1 4 9 16 9 7 4 9 11, after choosing this option, the array/array list will contain 1 4 9 16 7 11.

Your Main should display a menu with the following options:

  • Enter first array/array list
  • Enter second array/array list
  • Reverse array/array list
  • Append array/array list
  • Merge array/array list
  • Remove duplicate from array/array list
  • Quit

You should also perform appropriate error checking and output messages to the user as needed.

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.