Question: Commission Calculator Code Help for JAVA American Veeblefetzer, Inc. is a multinational distribution company. Each month it pays its sales force according to a formula

Commission Calculator Code Help for JAVA

American Veeblefetzer, Inc. is a multinational distribution company. Each month it pays its sales force according to a formula that uses the employee's monthly sales, number of years with the company, and rank.

For sales amounts between $100,000 and $200,000 inclusive, the sales commission is 1% of sales. For amounts over $200,000 and up to $300,000, 1.5%. For amounts over $300,000 and up to $400,000, 1.75%. For amounts over $400,000, 2%.

These percentages are based on the total sales and not just on the incremental amounts.

(Note that although there is no sales commission if the amount sold is below $100K, the salesperson is still eligible for the other commissions.)

Each salesperson also receives a commission of 1/10 of 1% of sales for each year with the company, up to a maximum of 1% at 10 years or more.

Salespersons also have a rank of Apprentice, Junior, or Senior. Apprentices receive no rank incentive, while Juniors receive 0.1% of sales and Seniors 0.2%.

Write a CommissionCalculator class to compute the monthly commission earned by a salesperson, given the salesperson's name, total sales, years of service with the company, and rank. Also write a class to test your CommissionCalculator class.

Specifications:

Your test class will perform the following operations in the order listed:

1. Prompt the program user for the salespersons name, monthly sales, years of service, and rank code, and create an object using the data entered.

2. Call the method that returns the data entered and print the string returned.

3. Call the method that computes and returns the commission and print it, formatted as U.S. currency.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!