CSC 15 lab 12 Due Wednesday 12/10 For this lab, you will practice fundamental operations on arrays as well as create a graphical user interface. Essentially, you are to: Write a class that contains, among other possible elements, a variable representing an array of integers. This class should extend JFrame and implement ActionListener. The constructor function of the class should creat the array. Use at least five integers for the array. The constructor should take as a parameter the number of elements in the array. Write functions within the class that does the following (all these functions operate on A, which is already declared inside the class!) 1. compute and return the sum of all the integers in the array. 2. compute and return the largest integer in the array, as well as the index of the largest integer. 3. swap adjacent elements that are out of order (as done in bubblesort) 4. Indicate which array elements are even, and which are odd. A number n is even if n%2==0, and odd otherwise. In the gui, you need to color the odd elements red and the even elements green (use the setBackground function on the JTextFields). 5. Your gui must be similar to how I described it in class. You are to have text fields where the user can input integer values into the array A. There should be 4 or more buttons each representing a function to be computed for the array. There should also be another text field displaying the result of the function. Since you don't know how many text field you'll need, you'll have to create an array of them and use a formula to determine where to place them on you gui. This part may be tricky, so you might want to start with just a fixed size array - say 5 integers, and later generalize it to allow for any number of integers. Note, give a JTextField F, F.getText() returns a string representing the content of the field. If the field contains a number such as "12", you need to call Integer.parseInt to convert it to an int. That is, Integer.parseInt(F.getText()) will give you the number displayed in F. F.setText(""+x) will output x to F. Java will automatically convert x to a string, regardless of what it is. THINGS TO WATCH OUT FOR: You'll need BOTH an array of integers, AND a parallel array of JTextFields - don't confuse them. Also, don't confuse the difference between the indices and the contents of the arrrays.