Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Develop a Java Program to produce random elementary Math questions for a user. Programming Exercise - Word Sign in X E File Home Insert Design

Develop a Java Program to produce random elementary Math questions for a user.

image text in transcribedimage text in transcribed
Programming Exercise - Word Sign in X E File Home Insert Design Layout References Mailings Review View Help Tell me what you want to do Share i UPDATES AVAILABLE Updates for Office are ready to be installed, but first we need to close some apps. Update now X Programming Exercise: Random Math Quiz To get you started with Eclipse and to help you get back into programming at the start of a new semester, this lab includes a moderately complex programming assignment. Remember that your program will be graded for style as well as for correctness. It should follow all the rules in the style guide (a link for which is available from the Resources sidebar on the course page), including the use of Javadoc comments (see below). 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 Activate Windows right on the second try. Go to Settings to activate Windows. Page 1 of 1 439 words 100% O Type here to search ii em Op 9 5 D X W 3:48 AM x 11/17/2018Programming Exercise - Word Sign in X E File Home Insert Design Layout References Mailings Review View Help Tell me what you want to do Share i UPDATES AVAILABLE Updates for Office are ready to be installed, but first we need to close some apps. Update now 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. Activate Windows Go to Settings to activate Windows. Page 1 of 1 439 words 100% O Type here to search D X W 3:49 AM x 11/17/2018

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions