Hey guys, this is the question.....

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 ()

--- Update ---

This is what i did..i kinda did the test and everything in one..

public class Commissions

{

public static int Main()

{

int rq1=20;

int rq2=15;

double p;

double r;

double n;

double a;

double basic = 2000;

double rq1price = 1500;

double rq2price = 3000;

double commission;

double totalsoldprice;

double planYear;

char invest;

String Id;

System.out.print("Enter Sales Id");

System.out.print("Enter number of RQ1 units sold");

System.out.print("Enter number of RQ2 units sold");

totalsoldprice = (rq1 * rq1price) + (rq2 * rq2price);

if ((rq1 + rq2) <= 50)

commission = totalsoldprice * 9 / 100;

if ((rq1 + rq2) > 50 && (rq1 + rq2) <= 100)

commission = totalsoldprice * 18 / 100;

if ((rq1 + rq2) > 100)

commission = totalsoldprice * 25 / 100;

System.out.print("\nInvest the commission in savings plan ? (Y=Yes, N=No) ");

if (invest == 'Y' || invest == 'y')

{

System.out.print(" Total gross sales amount ");

System.out.print(totalsoldprice);

System.out.print("\n");

System.out.print(" Commission earned ");

System.out.print(commission);

System.out.print("\n");

System.out.print(" Total salary ");

System.out.print(basic + commission);

System.out.print("\n");

}

{

p = commission * ((1.08));

System.out.print("The Commission savings plan earning after 1 years=");

System.out.print(p);

}

{

p = commission * ((1.08) * (1.08));

System.out.print("The Commission savings plan earning after 2 years=");

System.out.print(p);

}

{

p = commission * ((1.08) * (1.08) * (1.08));

System.out.print("The Commission savings plan earning after 3 years=");

System.out.print(p);

}

{

p = commission * ((1.08) * (1.08) * (1.08) * (1.08));

System.out.print("The Commission savings plan earning after 4 years=");

System.out.print(p);

}

{

p = commission * ((1.08) * (1.08) * (1.08) * (1.08) * (1.08));

System.out.print("The Commission savings plan earning after 5 years=");

System.out.print(p);

}

}

}