Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*****In Eclipse**** Programming 2 The assignment is to write a program that administers and grades a math quiz with randomly generated questions of several different

*****In Eclipse**** Programming 2

The assignment is to write a program that administers and grades a math quiz with randomly generated questions of several different kinds. You should target the quiz at an elementary school student who is learning basic arithmetic. The questions should ask the student to perform simple addition, subtraction, multiplication, and division problems. You can include other problems, such as finding remainders, if you want. You should probably stick to integers with a small number of digits. For each question, the type of problem should be selected at random, and then the numbers that occur in the problem should be randomly generated. (Hint: To get a reasonable division problem, a/b, select b and the answer at random, and compute the value of a.) The user should have two chances to get the right answer. If the user gets the correct answer to a problem on the first try, they get full credit for the problem. If not, they get a second try. If the user gets the correct answer on the second try, they get half credit. If the user fails to get the correct answer after two tries, tell the user the correct answer. The quiz consists of ten questions. At the end of the quiz, output a score along with the number of questions that the user got right on the first try and the number of questions that the user got right on the second try. You should try to write your program in a way that will make it easy to modify and improve. For example, you wouldn't want to hard code the number of questions as a literal constant in your program, would you? The preferred way to write the program is to define classes to represent the concepts that occur in the problem. You will create one such class (along with a main program) as part of your introduction to Eclipse. It's up to you whether you actually use this class (and possibly improve it) and whether you create additional classes. You should do so only if you are comfortable with the idea -- the most important thing is to have a working program.

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

Recommended Textbook for

Database Processing

Authors: David J. Auer David M. Kroenke

13th Edition

B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions