Search for question
Question

Instructions

Goal: calculate commission based on the SalesAmount.

Steps

1. Get Salesperson's name as input and store in variable called sales Name

Enter the Salesperson name

3. Get Sales amount as input and store in variable called salesAmount. Sales Amount can be in

decimals.

Enter Sales amount

4. Calculate the commission as shown below:

commission = 200+ (0.09 * salesAmount)

*** Commission can be decimal. Make sure you use Math.Round to round to nearest 2 digits. For

example $345.6920 should be displayed as $345.69

4. Create a variable called performanceStatus of type string.

5. Based on the sales amount, set performance status as shown below

a) if sales amount is between $0-2999 - poor c) if sales amount is between $3000-4999 - average d) if

sales amount is between $5000-9999-good e) if sales amount is between $10000-14999 - excellent

f) if sales amount is between $15000 and above - outstanding

7. Display name. Example:

Hello John Smith

6. Display commission. Example:

Your commission is $10450.45./n7. Display name. Example:

Hello John Smith

6. Display commission. Example:

Your commission is $10450.45.

7. Display performance status. Example:

Your performance is excellent.

Congratulations!!! You are all done.

Run Tests!!!

Fig: 1

Fig: 2