Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem Description: Write a program that reads from the keyboard the number of questions for a multiple choice test, a list of keys for the

Problem Description: Write a program that reads from the keyboard the number of questions for a multiple choice test, a list of keys for the correct answers, the number of students and a list of students answers. Each row of the list records a students answers to the questions. Each column records answers to a question. The program will then displays the average score and a question with the highest number of correct answers. (If there are more than one questions with the highest number of correct answers, display the first one counting from left to right.) Note 1. To read a character in, you can use: next().charAt(0) 2. Run and make sure that your program produces exactly the same output for each of the sample inputs listed below. 3. You can use single dimensional arrays.

Sample Input 1:

5

A B C D E

2

A C B D E

C B C D E

Sample Output 1:

70.0%

3

Sample Input 2:

10

B B B D A E B E B E

10

E A E B B B E E A E

C A E B B D D C E D

D E C D C D A C B D

B B C D B D B D D E

E E D A E D E C A A

E C A A B C D C C D

A A E D A D B B C B

D B A A E B A D B A

D B E B C E E C D A

E E D E A B A A C E

Sample Output 2:

18.0%

1

Sample Input 3:

10

B D C E A D E A C B

10

E B E C A A D B B B

A B A D A D A A D E

A C B A C D D D C B

B B A B B C E A A D

B C A A D A C C D C

B B A C B A D B D D

D C A D A E E A D B

D A A D B D C D D D

D D A B A E B A B A

D D A E C C E C A D

Sample Output 3:

24.0%

4

Sample Input 4:

5

A A C E C

3

A A C E C

A A C E C

A A C E C

sample output 4:

100.0%

0

Sample Input 5:

5

B A D C A

2

C A D C A

B A D B A

Sample Output 5:

80.0%

1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

=+(2.9) PUAK =EP(A) - EP(ANA,) k=1 i

Answered: 1 week ago