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.
Please find the code below::
package fileIO;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
public class AnnualSale {
public static void main(String[] args) {
double
annualSale;
Scanner sc = new
Scanner(System.in);
System.out.print("Enter amount of
annual sale : ");
annualSale = sc.nextDouble();
double fixedSalary = 30000;
double incentive =
annualSale*.07;
double total =
incentive+fixedSalary;
try {
PrintWriter
writer = new PrintWriter(new File("output.txt"));
writer.write("Fixed salary
: "+fixedSalary);
writer.write("\nAnnual sale
: "+annualSale);
writer.write("\nIncentive
: "+incentive);
writer.write("\nTotal annual compensation : "+total);
System.out.print("Fixed salary
: "+fixedSalary);
System.out.print("\nAnnual sale
:
"+annualSale);
System.out.print("\nIncentive
: "+incentive);
System.out.print("\nTotal annual compensation : "+total);
writer.close();
System.out.println("\nOutput has been sent to output.txt");
} catch (FileNotFoundException e)
{
// TODO
Auto-generated catch block
e.printStackTrace();
}
}
}
output:

output.txt is as below

You work for a software company has just created a new incentive for salespeople to earn...