OOP in Java Week Two Assignment

Write a Java application using NetBeans Integrated Development Environment (IDE) that calculates the total annual compensation of a salesperson. Consider the following factors:

  • A salesperson will earn a fixed salary of $500,000.
  • A salesperson will also receive a commission as a sales incentive. Commission is a percentage of the salesperson’s annual sales. The current commission is 6% of total sales.
  • The total annual compensation is the fixed salary plus the commission earned.

The Java application should meet these technical requirements:

  • The application should have at least one class, in addition to the application’s controlling class (a controlling class is where the main function resides).
  • There should be proper documentation in the source code.
  • The application should ask the user to enter annual sales, and it should display the total annual compensation.

 

Here are her extra notes as well with an attachment if it helps

We have discussed quite a bit on the class structure in the week 1. There are many good examples on the class structure in the weekly reading material:

  1. Chick example
  2. Egg example

 

This individual assignment is to mimic the class structure discussed in the week 1:

  1. SalesCommission class – calculate the total compensation based on the base salary, the commission rate and the annual sales.
  2. SalesCommissionApp class – has main method. It instantiates the SalesCommission class and calls the method of SalesCommission.

 

I attach one more sample code for you to review.

 

Hopefully it helps to reduce the learning curve.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *