Write a Mathematics program that asks a user what type of problem they wish to solve. After the choice is made, two random values between 0-99 will be created to be used in the calculation. The application will display the math problem to the user and ask them to solve. The application will solve the question and determine if the user entered the correct problem. If the user is correct or incorrect a message will display stating the result.

Step 1 - Use Textpad or another compiler to create a java program called MathQuestions. Save it with file name

Step 2 - Update the MathQuestions application to use methods to capture data from the user, and create math problems. You will need convert the existing application above to use at least 3 methods in your application.

Capture the active window screen capture, which has the output of the updated MathQuestions; insert it into this document.

Attach a copy of the update MathQuestions Source Code.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

public static void main(String[] args){
/* Declare Constant variables */
final int ADDITION = 1;
final int SUBTRACTION = 2;
final int MULTIPLICATION = 3;
final int DIVISION = 4;

            /* Declare local variable */
            int problemType = readProblemType();
            boolean answer = false;
            if (problemType < ADDITION || problemType > DIVISION ) {
                JOptionPane.showMessageDialog(null, "You should choose correct type of Math Problem.");
            int mathVar1 = getData(1);
            int mathVar2 = getData(2);
            int userAnswer = readAnswer(mathVar1, mathVar2, problemType);
$20.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats