Ex. 1 ------ Write a subroutine such that given an int array of any length, returns a new array of its first 2 elements. If the array is smaller than length 2, use whatever elements are present. Test your subroutine on arrays of different size. Example: Suppose the subroutine is called "frontPiece", then >frontPiece({1, 2, 3}) returns {1, 2} >frontPiece({1, 2}) returns {1, 2} >frontPiece({1}) returns {1} Ex. 2 ------ Given an int array of any length, write a subroutine that returns true if the array contains number 2 twice, and returns false otherwise. Test your subroutine on arrays of different size. Ex. 3 ------ Given an array of ints, return true if the sum of all the 2's in the array is exactly 8, false otherwise. Write a subroutine to implement this check. Ex. 4 ------ Write a subroutine such that given an array of ints returns an array that contains the exact same numbers as the given array, but rearranged so that all the even numbers come before all the odd numbers. Other than that, the numbers can be in any order. Example: Suppose the subroutine is called "evenOdd", then >evenOdd({1, 0, 1, 0, 0, 1, 1}) returns {0, 0, 0, 1, 1, 1, 1} >evenOdd({3, 3, 2}) returns {2, 3, 3} >evenOdd({2, 2, 2}) returns {2, 2, 2} Ex. 5 ----- Write a subroutine such that given an array of student names (i.e. Strings) prints out the list of name that start with the letter "M". Test your subroutine by writing a program that inputs a list of names provided by the user and prints out the names starting with letter "M". Example: >startWithM({"Musard", "John", "Marco"}) -> The following names start with "M": Musard, Marco >startWithM({"Lorena", "Javier"}) -> The array contains no names starting with "M" >startWithM({"Lorena", "Javier", "Monica"}) -> There is only one name starting with "M": Monica