Salesperson Java™ Application Part II

profilevaaredf
Commission.java

/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package commission; import java.util.Scanner; /** * * @author Bonie */ public class Commission { /** * @param args the command line arguments */ public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Enter the Total Annual Sales of the Person");// Request for User Input for Annual Sales int annualsales = sc.nextInt();// Read the input as Integer and assign it to annualsales variable System.out.println("With an Annual Salary of $100,000 and 10 % commision on total annual sales" );//display his salary and commision rate SalesPerson sp = new SalesPerson(annualsales);// Create an Instance of a new sales person System.out.println("The Annual Compensation is " + sp.getTotalAnnualCompensation()); //Calculate the annual compensation and output } }