Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please use java programming codes....(jgrasp).....!!!!! Stimulus distribution Create one class with a main method and at least two additional methods. Ask the user for two

please use java programming codes....(jgrasp).....!!!!!
Stimulus distribution
Create one class with a main method and at least two additional methods.
Ask the user for two positive integers. The first number is the bottom of the range and the second is the top of the range.
Create and call a method that takes the two numbers as arguments and generates a random number within that range and returns it.
Create and call a second method that takes the number just generated and distributes the money in the following way:
This method breaks the money down into four categories: Transportation, wages, food, business.
Generate a random number between 0 and 0.25. Multiply the input number by this percent to get a total for Transportation.
Example: if the input number is 1000 and the random value is 0.14 then transportation would get 140.
Do the same for the next two categories: wages and food resulting in three percentages and three-dollar values.
You will need to keep track of the running total to compute the last category. The last category, business, gets the left-over money after the first three categories are calculated. For instance, if the first three values are:
Transportation 22%
Wages 18%
Food 9%
Then the business percent is 100 -22 -18 9 = 51%.
And the business value for an input of 1000 is 510.
Print out the results in dollars.

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

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

Students also viewed these Databases questions

Question

explain Pure discount bonds

Answered: 1 week ago

Question

6. Is all Internet training the same? Explain.

Answered: 1 week ago