Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question Please can anyone put me through this program. One of your professors at the University you attend has asked you to write a program

Question

Please can anyone put me through this program. One of your professors at the University you attend has asked you to write a program to grade student answers to a series of questions. There are three (3) tests that the student must select from and the answers to each of the tests are loaded from a text file into a separate array. That is, each test could be a separate array (or you may combine into a 2-dimensional array) and the results are unique. The three (3) selections will be extremely similar. You just need to setup a menu system to allow the student to select one of the three tests from your menu.

Your task is to build a menu system to select one and only one of the tests based upon the input from the student. [You need to process the student-requested test but still setup the logic/code for three (3) tests.] Based upon the student-value entered from the menu, you then ask the student five (5) questions and validate the responses to the questions based upon the results compared to the answers.

The input to the obtained from an external file.That is, say for question three (3) of test 2 the answer is C then you need to validate that answer C is correct. If other answers are entered then the students answer is incorrect.Youll create the Answer Keys!

Question #4 allows for EITHER one of two (2) answers being correct. Note: Since a correct answer for Question #4 is coming into your program via the input file, youll need to hard-code the test for the second allowable answer. That is, if Question 4s correct answer is D, then youll need to hard-code an allowable second answer of, say, B. [It is possible to input the answers totally from the input file, but Im not asking you to do this!]

The FINAL question (question #5 for each test)has two (2) answers being correct so the student must enter two (2) responses and both responses must be correct in order to have a correct answer. Same situation for Question #5 as for Question #4 but BOTH answers must be correct. Youll need to hard-code the second answer here also.

Heres the general layout of the task:

Test selection: Each student has one (1) try and selects only one (1) test. Youll need to make sure the students entry is valid and have a way to terminate the program if the student doesnt want to take the test at this time.

Ask for name: Be sure to ask the student their name

Create Questions: You create the questions but the correct answer must match what was initially setup in an array. That is, if C is the answer, then your answer for C must be the correct answer. Generate the questions so that only ONE (1) response is allowed per question for Questions 1, 2 and 3. Require two (2) responses for Questions 4 and 5.

Questions 1-3 are multiple choice with only one response being correct

Question 4 can have EITHER one of two answers as correct.

If an incorrect answer is provided, then no credit

If one of the two answers is provided but not both, then provide full credit.

Otherwise, no credit

Question 5 must have two (2) answers to be correct and BOTH must be selected.

If BOTH responses are correct then the question is answered correctly.

If ONE response is correct then provide half credit.

If none of the responses are correct then provide no credit.

Questions: Im not too interested in the questions. Im interested in your logic and conditional setup for the questions. An example of questions could be adding or multiplying etc. to get some value.

Results tracking:

Display a message for EACH question if it is correct or not immediately after the student provides the answer.

You need to keep track of the number of questions that are correct and incorrect.

Produce the output at the end of the set of questions (by test) of the total number correct and incorrect. Format nnn.nn.Include the students name in the output sentence.

Produce a percentage of correct and missed. Format as nnn.nn%. Include the students name in the output.

Output: Output should be via the console AND via a file showing you tested and validated your logic.

EXTRA CREDIT (5 points): For Question #3, allow the user three (3) tries to get it correct. This Extra Credit may be placed in a special Graded Field in ACE.

Heres a very brief example:

Question #1: What is the product of three (3) times five (5)?:

A. 12
B. 18
C. 35
D. 15
E. None of the above

Responses to A, B, C, and E: Incorrect. Issue a message such as no credit, incorrect response. Save the incorrect response calculation into a variable and continue to the next question.

Response to D is correct.

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Database Machine Performance Modeling Methodologies And Evaluation Strategies Lncs 257

Authors: Francesca Cesarini ,Silvio Salza

1st Edition

3540179429, 978-3540179429

Students also viewed these Databases questions

Question

Question What is the doughnut hole in HSA coverage?

Answered: 1 week ago