Search This Blog

If you have any problem or question please write in the comments. We will try to solve and send you the solution. Not just that we will also post your problems solution on our blog.

Sunday, 2 October 2011

Java program to calculate commission on sales using methods (by Adler Lawn Service,LLC)

 import java.util.*;
class commission2
public static void main (String args[])
Scanner in =new Scanner (;
double sales_figure,commission_rate_d;
int commission_rate_i;
System.out.print ("\n\t Enter sales figure = ");
System.out.print ("\n\t Enter first commission rate = ");
System.out.print ("\n\t Enter second commission rate = ");
comm2 ob2 = new comm2();
totalcomm ob = new totalcomm();

class comm2 extends totalcomm
void computeCommission (double sales)
double cr;
System.out.println ("\n\t Commission at 7.5% = "+cr);

class totalcomm
double sales_fig,comm_rate;
int com_rate;
void computeCommission(double p1, double p2)
System.out.println ("\n\t Sales commission = "+(sales_fig*comm_rate));
void computecommission(double p1, int p2)
System.out.println ("\n\t Commission = "+(sales_fig*com_rate));


  1. I need a java program to do the following:

    Every salesperson has a basic salary.the salesperson also receives a bonus at the end of each month based on the following;

    if the salesperson has work for 5 years or less,the bonus is $10 for each year he has work there.
    if the salesperson has work more than 5 years, the bonus is $20 for each year he has work there.
    the sales person can earn additional bonus :
    if the total sale made by the salesperson for the month are greater than or equal to $5,000 but less than $10,000, he get 3% commission on the sale.
    if the total sale made by the salesperson for the month are $10,000 or more, he get 6% commission on the sale.

  2. Nice, I have problem to solve this question: A large insurance company in USA pays its sales agent on a commission basis. The sales agent receives N$600 per week plus 20% of the gross sales for that week. For example a sales agent who sells N$8000 worth of insurance plans in a week receives N$600 plus 30% of N$8000. Write a Java Program to displays the sales agent salary per week and the salary per month. The salary per month is calculated as salary per week times four. can someone help me to solve please!

  3. I need a java program about this problem of Sales Commission Calculator.

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

    Develop a Java application that inputs one salesperson's items sold for last week and calculates and displays that salesperson's earnings. There's no limit to the number of items that can be sold.