Write a complete Java program that declares an integer array, intArray, and initialize it to {1, 2, 3, 4, 5, 6, 7}. The program should have the following methods:
1. void displayOddPositions ()
This method displays the array elements in the odd positions only, namely, 2, 4, 6.
2. void displayReverse ()
This function displays the array elements in reverse order so the last item appears first and vice versa.
3. void multiplyByFactor (int factor)
This method multiplies all elements in the array by a given factor.
4. void addArray(int[] givenArray)
This method is used to add an array to the current data field intArray. First, check that the givenArray is the same length as the data field array. If they are the same length, then add each element in the givenArray to the corresponding element in intArray.
5. Write the main method to test and show the functionality of the above methods.