/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
// your code goes here
/*/*
*Rachel Sussman
*Prg/420
*5/27/15
*Simple Commission Calculation Program Part 1
*/
// This program will calculate the total annual compensation of a salesperson.
// This program will calculate the total annual compensation of a salesperson.
// Author - Brad Eyman
import java.util.Scanner;
public class commission.java
{
// This is the beginning of the main method
public static void main
(String[] args
) {
// This method displays the salesperson's fixed annual salary
double monthlySalary; // Salesperson's fixed monthly salary
monthlySalary = 10000;
double annualSalary; // Salesperson's fixed annual salary
annualSalary = monthlySalary * 10; // 10 represents months in a ten month employee contract
System.
out.
println("The Salesperson earns a fixed monthly salary of $" + monthlySalary + ".");
System.
out.
println("The Salesperson earns a fixed annual salary of $" + annualSalary + ".");
// This method displays the salesperson's commission rate
int commission;
commission = 5;
System.
out.
println("The Salesperson will receive a commission of " + commission + "%.");
// Creates Scanner to collect annual sales input from salesperson
Scanner input
= new Scanner
(System.
in);
double annualSales; // Salesperson's annual sales
System.
out.
print("Enter annual sales: "); annualSales = input.nextDouble();
double commissionCalc; // Calculates commission of annual sales
commissionCalc = annualSales * .05;
System.
out.
println("The annual sales of the salesperson is $" + commissionCalc + " using a 5% commission.");
double totalAnnualSum; // Salesperson's total annual compensation
totalAnnualSum = annualSalary + commissionCalc;
System.
out.
println("The total annual compensation of the salesperson " + "is: $" + totalAnnualSum + ".");
} // end main method
} // end class CommissionCalculation1
}
}