1. Write a method which does the following:

a. Ask the user to enter a size of array between 2 to 10.

b. Based on the size entered, write a loop which asks the user to fill values into an integer array. Print the array contents using Arrays.toString().

c. For this integer array, write a logic that returns true if there exists a place to split the array such that the sum of the numbers on one side is equal to the sum of the numbers on the other. Otherwise return false.

d. Examples:

If the array is {1, 1, 1, 2, 1} then return true.
If the array is {2, 1, 1, 2, 1} then return false.
If the array is {10, 10} then return true.

2. Implement a mergeUniqueValues(arr1, arr2) method. When passed two arrays of strings, it will return an array containing the strings that appear in either or both arrays in sorted order. And the returned array should have no duplicates.

For example, if you have two string arrays:

arr1: {"Bear", "Elephant","Fox"}
arr2: {"Panda", "Elephant","Eagle"}

Calling mergeUniqueValues(arr1, arr2) should return a merged and sorted array like:

Bear, Eagle, Elephant, Fox, Panda

3. Open Ended Problem:

Write two or more classes which covers the following concepts:

  • Make use of user input/output.
  • Make use of try...catch blocks.
  • Make use of if...else and switch...case conditions.
  • Make use of for or for...each or while loops.
  • Make use of break and continue statements.
  • Make use of arrays and Strings.
  • Make use of Javadocs, single line comments and multi-line comments.
  • Make use of default, no-args and parameterized constructors.
  • Make use of 'this' and final keywords.
  • Make use of public and private access modifiers.

Because there are two or more classes, only one class should contain the "main()" method and inside that you should create objects of other classes and call their methods.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be 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 complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.