Question: Java language Please answer number 21 using intelliJ in 4 different files to show patterns A, B, C, and D a. Q 20. (3 points)

Java language

Please answer number 21 using intelliJ in 4 different files to show patterns A, B, C, and D

Java language Please answer number 21 using intelliJ in 4 different files

a. Q 20. (3 points) Write Java statements that do the following Declare an array alpha of 10 rows and 20 columns of type int. Initialize each element of the array alpha to 5. Store 1 in the first row and 2 in the remaining rows. Store 5 in the first column, and the value in each remaining column is twice the value of the previous column. Print the array alpha one row per line. Print the array alpha one column per line, c. d. 1. Programming Questions Q21. (6 points) (Display four patterns using loops) Use nested loops that display the following patterns in four separate programs: Pattern A Pattern B Pattern Pattern D 1 2 3 4 5 6 1 1 2 3 4 5 6 1 2 1 2 3 4 5 21 1 2 3 4 5 1 2 3 1 2 3 4 3 2 1 1 2 3 4 1 2 3 4 1 2 3 4 3 2 1 1 2 3 1 2 3 4 5 5 4 3 2 1 12 1 2 3 4 5 6 1 6 5 4 3 2 1 1 1 2 1 Q22. (6 points) 7. Write a program that allows the user to enter the last names of five candidates in a local election and the votes received by each candidate. The program should then output each candidate's name, the votes received by that candidate, and the percentage of the total votes received by the candidate. Your program should also output the winner of the election. A sample output is: Candidate Votes Received of Total Votes Johnson 5000 25.91 Miller 4000 20.73 Duffy 6000 31.09 Robinson 2500 12.99 Ashtony 1800 9.33 Total 19300 The Winner of the Election is Duffy

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!