Question

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

ou 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:

  • A salesperson will earn a fixed salary of $30,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 7% of total sales.
  • The total annual compensation is the fixed salary plus the commission earned.

The Java® application should meet the following 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).
  • A file needs to be created to contain the output.
  • 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.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

Explanation:

Compensation class is the one which calculates the total compensation based on the constants salary, percentage of commission and the sales given input by the user.

Main class is the controlling class.

import java.util.Scanner; class Compensation final double salary = 30000; final double percentage = 7; double sales; public d

import java.util.Scanner;
class Compensation
{
final double salary = 30000;
final double percentage = 7;
double sales;
  
  
public double getTotalCompensation()
{
Scanner sc = new Scanner(System.in);
  
   System.out.println("Enter the sales");
  
   sales = sc.nextDouble();
  
double total_compensation = (double)((sales*7)/100) + salary;
  
return total_compensation;
}
}

public class Main
{
   public static void main(String[] args) {
  
  
      
       Compensation ob = new Compensation();
       System.out.println("Total Compensation is: $"+ob.getTotalCompensation());
   }
}

Output:

Enter the sales 1002 Total Compensation is: $30070.14 ... Program finished with excit code 0 Press ENTER to excit console.U

PLEASE UPVOTE IF YOU FOUND THIS HELPFUL!

Add a comment
Know the answer?
Add Answer to:
ou work for a software company has just created a new incentive for salespeople to earn...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • A large company pays its salespeople on a commission basis. The salespeople each receive $200 per...

    A large company pays its salespeople on a commission basis. The salespeople each receive $200 per week plus 9% of their gross sales for that week. For example, a salesperson who sells $5000 worth of chemicals in a week reeives $200 plus 9% of $5000, or a total of $650. You have been supplied with a list of items sold by each salesperson. The values of these items are as follows: Item Value 1 239.99 2 129.75 3 99.95 4...

  • Ok So I have the code I need! and it runs on online codechef IDE! The...

    Ok So I have the code I need! and it runs on online codechef IDE! The code is below: import java.util.Scanner; import java.io.FileWriter; public class Main { public static void main(String[] args) {    Scanner sc = new Scanner(System.in);    double sales; System.out.print("Enter annual sales: "); sales = sc.nextDouble();    double fixed = 30000;    double commission = (7.0*sales)/100.0;    double total = fixed + commission;    System.out.println("Fixed Salary: "+fixed); System.out.println("Annual Sales: "+sales); System.out.println("Commission: "+commission); System.out.println("Total Salary: "+total);      ...

  • 31 O has nothing to do with the selection of new salespeople. lists the specific tasks...

    31 O has nothing to do with the selection of new salespeople. lists the specific tasks that salespeople are expected to do. should not be used as a basis for performance evaluation. none of the above. QUESTION 19 Regarding the training of salespeople: O a good salesperson does not need training. O experienced salespeople do not need training. O most good salespeople are "born salespeople" and possess the necessary skills without training. time spent on classroom training of new salespeople...

  • Use a two-dimensional array to solve the following problem. A company has four salespeople (1 to...

    Use a two-dimensional array to solve the following problem. A company has four salespeople (1 to 4) who sell five different products (1 to 5). Once a day, each salesperson passes in a slip for each different type of product sold. Each slip contains the following a) The salesperson number b) The product number c) The total dollar value of that product sold that day Thus, each salesperson passes in between 0 and 5 sales slips per day. Assume that...

  • C++ Background information: A company has four salespeople who sell five different products. Once a day,...

    C++ Background information: A company has four salespeople who sell five different products. Once a day, each salesperson passes in a slip for each different type of product sold. First on the line is the salesperson name, second is the product number, and third is the sales volume for this product by this salesperson in dollars. For example, the line Tara 2 200.00 means that salesperson Tara reported sales of volume $200.00 for product number 2. Data: Eric 1 200000.00...

  • (Java) Please include one data type class and one driver class in the program. Please also...

    (Java) Please include one data type class and one driver class in the program. Please also include a UML diagram and pseudocode. B. REQUIREMENT STATEMENT THIS LAB REQUIRES OBJECT ORIENTED PROGRAMMING. YOU HAVE TO CREATE ONE DATA TYPE CLASS AND ONE DRIVER CLASS (include main) One company request an application that allows users to READ from the keyboard the information of a vendor: name (String), id (String), sale amount in the month (double) then calculate the salary of vendors based...

  • Sales Data Analysis A company has multiple salespeople. Every month, they go on road trips to sel...

    Sales Data Analysis A company has multiple salespeople. Every month, they go on road trips to sell the company's product. At the end of each month, the total sales for each sales person, together with that salesperson's ID and the month, is recorded in a file. At the end of each year, the manager of the company wants to see an Annual Sales Report in the format illustrated in the sample execution below. Your report should look substantially similar to...

  • Question 1 (25 points) Your company has a market share of 25%. The total market size...

    Question 1 (25 points) Your company has a market share of 25%. The total market size is $100 million. Your contribution margin (the ratio of the contribution per unit over the price per unit) is 20%. Your variable cost is $16 per unit. You are thinking of hiring 10 more salespeople. The annual cost per salesperson (including salary and benefits) is $120,000. In addition, each salesperson receives as a bonus 10% of the sales he or she generates. How much...

  • Use program control statements in the following exercises: Question 1 . Write pseudocode for the following:...

    Use program control statements in the following exercises: Question 1 . Write pseudocode for the following: • Input a time in seconds. • Convert this time to hours, minutes, and seconds and print the result as shown in the following example: 2 300 seconds converts to 0 hours, 38 minutes, 20 seconds. Question 2. The voting for a company chairperson is recorded by entering the numbers 1 to 5 at the keyboard, depending on which of the five candidates secured...

  • I really need help with this, please. This is a java programming assignment. Project 1 The first programming project inv...

    I really need help with this, please. This is a java programming assignment. Project 1 The first programming project involves writing a program that computes the salaries for a collection of employees of different types. This program consists of four classes. 1. The first class is the Employee class, which contains the employee's name and monthly salary, which is specified in whole dollars. It should have three methods: a. A constructor that allows the name and monthly salary to be...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT