One large chemical company sells its chemical equipment at the following rates:
Equipment Code Description Price
RQ1 Reactor 0.5KL GMP \$1500
RQ2 Reactor 20 KL Non GMP \$3000
The company pays its salespeople on a commission basis. The salespersons receive the basic pay of \$ 2000 per
month plus a percentage of their gross sales for that month as follows.
Total number of units Sold (RQ1+RQ2) Percentage commission
1 to50 9%
51 to 100 18%
Above 100 25%
The company also has a savings plan for the sales persons. The salespersons have a choice to invest their
commission in the plan. If a person invests in a savings plan, it yields 8 percent interest. Assuming that all interest is
left on deposit in the savings plan account, calculate and print the amount of money in the savings plan account at
the end of each year for 5 years. Use the following formula to determine these amounts:
a=p(1+r)^n
where,
p is the original amount invested,
r is the annual interest rate,
n is the number of years,
a is the amount on deposit at the end of the nth year.
Write a program that takes as input the number of units of each type sold by the sales persons and calculates the
commission. The program also gives the option to input the sales personâ€™s desire to invest in the savings plan. The
program should calculate and display the total sales amount, the commission and amount accumulated in the
savings plan after 5 years. The program should interact with the user as follows.
Use scanner object to take inputs and displays the output using system.out.println ()

## All 2 Replies

I think you will get a better response if you post the code you have so far. Otherwise it will look like you are just trying to get people to write all the code for you.

I think you will get a better response if you post the code you have so far. Otherwise it will look like you are just trying to get people to write all the code for you.

I agree. Another tip I can give from when I took Java as my first programming class is to break up the code into logical sections, and don't start the next until the previous one is functioning as intended.

In your case, the first step might be to write a basic prompt and store the user inputs as variables. It makes no sense to try and figure out how you are going to calculate all the desired values if you don't even have a working user input.

Honestly, you have a great head start since your professor gave you all of the formulas you'll need already. Mine just said "here is what I want the program to do, go make it"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.