You work for a software company has just created a new incentive for salespeople to earn a commission on each sale. The current program only allows for a fixed salary. The Chief Information Officer (CIO) has asked you to create a new program that allows the functionality for a fixed salary and commission.
Write a Java® application, using NetBeans IDE, that calculates the total annual compensation of a salesperson.
Consider the following:
The Java® application should meet the following technical requirements:
Compile your Java® application files into a ZIP folder.
Submit the ZIP file.
CAN SOMEONE CREATE AN EXACT COPY AND PASTE TO PUT INTO NETBEANS or online compiler. Every other Chegg answer I've tried spits out errors.
CAN SOMEONE CREATE AN EXACT COPY AND PASTE TO PUT INTO NETBEANS or online compiler. Every other Chegg answer I've tried spits out errors.
import java.util.Scanner;
public class Compensation{
public static void main(String[] args) {
// defining a final variable salary for assigning fixed salary of salesperson
final double salary = 30000.00;
//declaring variables for annual sales, commission and total annual compensation
double annualSales, commision, totalCompensation;
Scanner in = new Scanner(System.in);
//reading annula sales from user's keyboard
System.out.print("Enter salesperson's annual sales: ");
annualSales = in.nextDouble();
//calculating commision from annual sales
commision = annualSales*(7.0/100);
// calculating total annual compensation by using fixed salary and the commission earned.
totalCompensation = salary + commision;
//displaying total annual compensation of sales person
System.out.println("Total annual compensation is $"+totalCompensation);
}
}
Get Answers For Free
Most questions answered within 1 hours.