Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please follow all the instructions. Please create the program exactly as directed. If it is not done exactly as directed I will not receive credit

Please follow all the instructions. Please create the program exactly as directed. If it is not done exactly as directed I will not receive credit for the assignment.
image text in transcribed
image text in transcribed
Write Java program. including comments, to copute tatistics for how students did on an exam.The program should compute varlous things about a student and print it all out Then it repeats the process for each new student until the entire set of data has been completed la) The program reads in and prints the TD number of a student Isee step g below and then the number of rsght answers and the nunber of wrong answers {The tctal number of question on the test is so.) For example, the program could read in the following: 1234 20 5 TD number 1234 has 2D right and 5 xrong) {b) The program computes and prints the total numb@ f questions answered plus the nunber omitted (which is simply 50 minus the number ansered) number right plua the number wrong will never be more than 50 see optional (a) below] The Ic) The program computes the student's correct answer percentage, which is a decimal value between D and The correct answer percentage is the number of right anssers divided by the numbez of questions answered always answe rs t least one question.-see optional (b).] For the data value shown for ID number 1234 above, the correct answe r Percentag. is 20 / 25 0.800 The program should print this out as shown, with three decimal places The student d) The pzogra also assigns the student a nunerical grade on the exam. The numerical grade is the number of ight answers times 2 gnoring the wrong answers), For 9xample, ID nuaber 1234 qot a numerical g:ad of 40 on th xarz 20 right x 2 The progzan prints the student's grade e) The progzam deterninea f the student had more right than wrong anawers lho same number of cach, or noru rong 1han right answe :s. It prints an approprlate message ) The progran determines if the student omitted ten or more questionsIt prints a message with this information g) Then the program akips a few lines and repeats the entire process for the next student unti1 the last student is finished. recognize the last student (Hint: use a sentinel. You must decide how to th) At that point, print the total number of students in the class (you must keep track of this as the program executes) and stop Data: B@ sur@ t r@ad in data f at least 12 students. Make sure that you have at least two with the sane number right and wrong, at least to with more wrong than right, and at least two with nore right than trong. Tnclud student with all wrong ansers and one wth a right ansvers but not So right), Have some students who don't omit anything and ome who omit almost all the questions. Output: Here is a complete set of output for to typical students: id 1234 12 right 13 wrong total answer d 25 nu.b omitted is 25 grade is 24 nore wzong than right correct answer pet. is 0.480 id 7890 30 right total answer d 45 nuber omitted is 5 grade is 60 more right than wrong correct answer pct. is 0.667 less than 10 onitted 15 wrong 2 of 2 Note: Output must be file directed. Do not send prompts to the output file Do not use global file objects. Optionals: (a) If a student answered more than 50 questions, print an error message, skip the rest of the processing, and go on to the next student. bMake sure that you do not divide by if the student answered no questions (everything was omitted)Print a special message and go on to the next student. (c) Keep track of the student with the best correct answer percentage and the one with the highest gradeThese do not have to be the same--to test, make sure they are different. Print these out at the end (d) use a table to display the outpu

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_2

Step: 3

blur-text-image_step3

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