I'm having Java course and I have to submit the following programs by the coming Wednesday for what I am not skilled enough till now. Please may you code those for me for this time?

PART 1

P1. Write a java program to calculate the roots of a quadratic equation f(x) = ax^2 + bx + c.

Take the equation coefficient input a, b, and c from the keyboard. Check for normal, equal and imaginary roots.

Sample Output

```
Two roots are equal and x = 5
The complex roots are, x1 = 1 + 2i and x2 = 1 - 2i
Roots are, x1 = 3.2 and x2 = - 1.5
```

P2. Write a program that takes two integers x, y as input and prints the sum result in the screen.

```
Version 1: (task-based program)
Use code for console input and output
Version 2: (GUI program)
Use code for GUI input and output (JOptionPane)
```

P3. Write a program that takes three integers s, y, z as input and prints the maximum and minimum numbers in the screen. Use only grapical I/O.

PART 2

P4. Write a java program to design the following method that can ve used to find the sum of surrounding row and columns in a two dimensional square array of size n*n.

```
/*
Input: A two difmensional square array of integers.
Output: Returns the sum of surrounding rows and columns.
*/
int surroundingSum ( int [][] array){
}
```

P5. Write a program to allocate differing sized 2nd dimensions of a two-dimensional array and assign the following pattern. Allocation code should follow the pattern; no manual allocation will be allowed.

```
55 45 36
28 21
15
10 6
3 1 0
```

P6. Generate the following diamond pattern (using 'loop' operation)

```
1
4 2 4
9 6 3 6 9
4 2 4
1
```