COSC 311 Homework 9/6/2017 Insert array of int into another array of int at specified location Distributed: Wed 9/6/2017 Due: Mon 9/11/2017 Write a Java function that will return an array of int that is formed by inserting a second array at a specified position. This is not a destructive function: allocate space for the resulting array. The function header is: int[] insert (int[] a, int[] b, int offset); You may use static function for insert() if you prefer. You will need a print array function as well. You may use the following code or your own code. printArray(int[] array) { for (int i = 0; i < array.length; i++) System.out.print(" " + array[i] + " "); System.out.println(); } Example: int[] a = {1, 2, 3, 4}; int[] b = {10, 11}; int[] c = insert(a, b, 2); The array c is {1, 2, 10, 11, 3, 4} Any offset outside the range [0 .. a.length-1] returns an empty array. If a[] is empty or b[] is empty, return an empty array. To demonstrate your program works, for each call to insert(), - call insert(a, b, offset) - print a[], b[], offset, c[] Execute the following cases: (1) a = {1, 2, 3} b = {10, 11, 12, 13} offset = 0 (2) a = {1, 2, 3} b = {10, 11, 12, 13} offset = 1 (3) a = {1, 2, 3} b = {10, 11, 12, 13} offset = -2 (4) a = empty array b = {10, 11, 12} offset = 1 Constraints: (1) Use no Java objects or classes beyond char stream I/O; do not use ArrayList (3) You must use int[] arrays. Points taken off for: (1) Doesn't work (2) Failure to meet style constraints (3) Code does not match output (4) Ugly or difficult to understand code