Question: Using Java, Write a program that grades a test. The test has 15 multiple choice questions. Here are the correct answers: 1. B 2. D

Using Java,

Write a program that grades a test. The test has 15 multiple choice questions. Here are the correct answers:

1. B 2. D 3. A 4. A 5. C 6. D 7. A 8. B 9. C 10. A 11. B 12. C 13. D 14. A 15. B

A student must correctly answer 12 out of the 15 questions to pass the test.

Write a program that holds the correct answers to the test in an array. The program should have an array that hold's the student's answers. The program should have the following static methods: a. passed() returns true if the student passed the test or false if the student failed. b. totalCorrect() - Return the total number of correctly answered questions. c. totalIncorrect() - Returns the total number of incorrectly answered questions. d. An int array containing the questions numbers of the questions that the student missed.

Demonstrate the program by setting the values of student's answers in main(You are not required to prompt the user to enter values using Scanner or System.in.read()), and then display the result returned from the methods written in the program.

Here are some suggestions on variable and method declarations. char [] coorectAns = new char[15]; char [] studentAns = new char[15];

static boolean passed(char [] correct, char [] student) { } static int totalCorrectAnswers(char [] correct, char [] student) { } static int totalInCorrectAnswers(char [] correct, char [] student) { } static int [] questionNumbersMissed(char [] correct, char [] student) { //which questions were either not answered or were incorrect. //declaring a char array that keeps track of the questions that were incorrectly answered. }

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!