Revision Programs

Set 5

Incentive and Salary Problems

1.1.

  1. Input name, salary and sales amount of a sales executive. Find his incentive and gross income. Incentive rate is 5% of the sales amount that exceeds 500000 (Consider that the sales amount is above 500000). Print all details. Gross income=salary+incentive.

2.1.

  1. Input salary and sales amount of a sales executive. Find his incentive and gross salary. If the sales amount is above 500000 then incentive is 8% of the sales amount that exceeds 500000. Print salary, sales amount, incentive and gross salary.

2.2.

  1. Input salary and sales amount of a sales executive. Find his incentive and gross salary. If the sales amount is above 500000 then incentive is 10000 + 8% of the sales amount that exceeds 500000, otherwise 2% of the sales amount. Print salary, sales amount, incentive and gross salary.

2.3.

  1. Input salary and sales amount. Find incentive and gross salary; print them along with salary and sales amount.
    If sales amount is above 1000000 then incentive is 50000 + 10% of the amount that exceeds 1000000.
    If sales amount is above 500000 then 10000 + 8% of the amount that exceeds 500000, else 2%.

2.4.

  1. Input salary, sales amount and years of service. Find incentive and gross salary. The incentive is calculated on sales amount. The rate is given below:
    Amount Service above 5 yrs Service 5 yrs or below
    1000000 or above 11% 10%
    500000 or above 9% 8%
    Below 500000 3% 2%

2.5.

  1. Write a menu-driven program:
    1) Calculate incentive and total salary. Rate is 10% on the sales amount
    2) Calculate Life Insurance deduction and Remaining salary. Rate is 12% on the salary.

3.1.

  1. Input name, salary and sales amount of n sales executives. Find their incentive and gross salary. If the sales amount is above 500000 then incentive is 8% of the sales amount that exceeds 500000. Otherwise 2%. Print salary, sales amount, incentive and gross salary for each employee. Also find grand total of salaries. Format is given below:
    Sl.No.NameSalaryAmountIncentiveGross salary
    1xxxxxxxxxxxxxxx
    Grand total of salaries: xxx

4.1.

  1. Input name and salary of n salesmen. Sort both arrays simultaneously name in alphabetical order using bubble sort. Display both arrays as a list.

4.2.

  1. Initialize integers to a 3 x 3 matrix. Display the left and right diagonals and find some of them separately.

5.1.

  1. W a p using overloaded methods void salCalc() to find followings:
    1) Calculate incentive and total salary. Rate is 10% on the sales amount
    2) Calculate Life Insurance deduction and Remaining salary. Rate is 12% on the salary.

6.1.

  1. Define a class Salary. Data members / Instance variables: name, salary, incentive and gross.
    Member methods:
    1) Salary() - parameterized constructor to initialize null values to data members.
    2) input() - to input name and salary.
    3) salCalc() – to find incentive and gross salary. If annual salary is above 600000 then rate is 8% of the salary else 2%.
    4) display() – to display details. Write main() also.