Final answer:
The method 'problem9' takes two arrays of integers, compares them to find unique elements in each, and returns an array of these unique elements. In the example, it returns {1, 3, 2, 7, 6} for the provided test case arrays.
Step-by-step explanation:
The question asks to add a method named problem9 that accepts two arrays of integer values and returns a new array containing elements that are unique to each array (i.e., the elements that are not found in both arrays). To accomplish this, the method will iterate through each array and check for the presence of each element in the other array. If an element from one array is not found in the other, it is added to a result array which is eventually returned.
Example Implementation:
Suppose we are implementing the method in a programming language like Java. We could create a HashSet for each array, which allows us to efficiently check whether an element from one array exists in the other. After populating the hash sets, we would iterate through each array and check whether each element is in the other set. If not, we add it to the result set. Finally, we convert the result set back to an array and return it.
Test Case:
Given the test case arrays Array1: {1, 4, 3, 2, 5} and Array2: {7, 5, 4, 6}, the problem9 method would return {1, 3, 2, 7, 6} since these are the elements that only appear in one of the arrays respectively.