Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a new project called 04.07 Calling Methods in the Mod04 Assignments folder. Create a class called MathTrick in the newly created project folder. Complete

  1. Create a new project called 04.07 Calling Methods in the Mod04 Assignments folder.
  2. Create a class called MathTrick in the newly created project folder.
  3. Complete the static methods in the starter code.
    1. Utilize Math. random() and any other methods from the Math class as needed.
    2. Utilize .substring() where appropriate.
    3. Each method should return a value of the correct data type.
  4. Call the completed static methods in the main method to complete a program that does the following:
    1. Generate a random 3-digit number so that the first and third digits differ by more than one.
    2. Now reverse the digits to form a second number.
    3. Subtract the smaller number from the larger one.
    4. Now reverse the digits in the answer you got in step c and add it to that number.
    5. Multiply by one million.
    6. Subtract 733,361,573.
    7. Then, replace each of the digits in your answer, with the letter it corresponds to using the following table:
    8. Now reverse the letters in the string to read your message backward.
  5. Open the MathTrick.java file to begin your program.

Notice that these instructions double as pseudocode and including pseudocode in a program provides documentation.

Expected Output: The output of the program should resemble the following screen shot:

Could someone help, please?

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 Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

0137916787, 978-0137916788

More Books

Students also viewed these Databases questions

Question

Understand the different approaches to job design. page 167

Answered: 1 week ago