Write a program that asks the user to input the following data for n employees: - • Basic Salary • Experience years • Employee Class Then do the following for each one: - float value. integer value integer value (1 or 2 or 3) only. 1. Calculate the Basic allowance according to the following table:

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section: Chapter Questions
Problem 8PP: (Data processing) A bank’s customer records are to be stored in a file and read into a set of arrays...
icon
Related questions
Question
1) Employee salary.py
Write a program that asks the user to input the following data for n employees: -
• Basic Salary
• Experience years
• Employee Class
Then do the following for each one: -
float value.
integer value
integer value (1 or 2 or 3) only.
1. Calculate the Basic allowance according to the following table:
Basic Allowance
7% of Basic Salary
Basic Salary
Basic Salary < 200
200 s Basic Salary < 400
10% of Basic Salary
400 S Basic Salary
15% of Basic Salary
2. Calculate the Technical allowance according to the following table: -
Experience Years
Technical Allowance
Experience Years 2 10
20% of Basic Salary
Experience Years
12% of Basic Salary
< 10
3. Calculate the Gross salary according to the following formula: -
Gross salary = Basic salary + Basic allowance +Technical Allowance
4. Calculate the Retirement Deduction according to the following table:-
Gross Salary
Gross Salary < 300
Gross Salary
Gross Salary
Gross Salary
Gross Salary
Gross Salary < 600
Class
Retirement Deduction
2% of
4% of
Gross Salary
Gross Salary
Gross Salary
1
300 s
< 500
500 S
6% of
< 200
< 400
5% of
Gross Salary
200 s
400 S
78 of
Gross Salary
Gross Salary
Gross Salary
2
9% of
600 S Gross Salary
12 of
3
no retirement deduction for this class
5. Calculate the Net Salary according to the following formula
Net salary = Gross salary - retirement deduction
6. Calculate the average of net salaries for all employees
YOUR INPUT AND OUTPUT SHOULD BE AS THE FOLLOWING SAMPLE:-
Enter No. of employees:3
Enter the basic salary of employee (1):350
Enter the class of employee
(1):2
Enter experience years for employee(1):15
------emp(1)----
= 350
= 15
Technical Allowance = 70.0 Gross salary
Retirement Deduction=40.95 Net salary = 414.05
= 2
Basic Allowance= 35.0
= 455.0
CLASS
Basic Salary
Experience Years
Enter the basic salary of employee (2):500
Enter the class of employee
(2):1
Enter experience years for employee(2):20
---emp(2)---
= 500
= 20
Basic Salary
Experience Years
Technical Allowance = 100.0 Gross salary
Retirement Deduction=40.50 Net salary
CLASS
= 1
Basic Allowance= 75.0
= 675.0
= 634.5
-------
Enter the basic salary of employee (3):400
Enter the class of employee
Enter experience years for employee(3):8
------------------emp(3)-------
Basic Salary
Experience Years
Technical Allowance = 48.0 Gross salary
Retirement Deduction=0.00
(3):3
= 3
Basic Allowance = 60.0
= 508.0
= 508.0
= 400
= 8
CLASS
Net salary
-----------
-------
Average of all net salaries =518.85
Transcribed Image Text:1) Employee salary.py Write a program that asks the user to input the following data for n employees: - • Basic Salary • Experience years • Employee Class Then do the following for each one: - float value. integer value integer value (1 or 2 or 3) only. 1. Calculate the Basic allowance according to the following table: Basic Allowance 7% of Basic Salary Basic Salary Basic Salary < 200 200 s Basic Salary < 400 10% of Basic Salary 400 S Basic Salary 15% of Basic Salary 2. Calculate the Technical allowance according to the following table: - Experience Years Technical Allowance Experience Years 2 10 20% of Basic Salary Experience Years 12% of Basic Salary < 10 3. Calculate the Gross salary according to the following formula: - Gross salary = Basic salary + Basic allowance +Technical Allowance 4. Calculate the Retirement Deduction according to the following table:- Gross Salary Gross Salary < 300 Gross Salary Gross Salary Gross Salary Gross Salary Gross Salary < 600 Class Retirement Deduction 2% of 4% of Gross Salary Gross Salary Gross Salary 1 300 s < 500 500 S 6% of < 200 < 400 5% of Gross Salary 200 s 400 S 78 of Gross Salary Gross Salary Gross Salary 2 9% of 600 S Gross Salary 12 of 3 no retirement deduction for this class 5. Calculate the Net Salary according to the following formula Net salary = Gross salary - retirement deduction 6. Calculate the average of net salaries for all employees YOUR INPUT AND OUTPUT SHOULD BE AS THE FOLLOWING SAMPLE:- Enter No. of employees:3 Enter the basic salary of employee (1):350 Enter the class of employee (1):2 Enter experience years for employee(1):15 ------emp(1)---- = 350 = 15 Technical Allowance = 70.0 Gross salary Retirement Deduction=40.95 Net salary = 414.05 = 2 Basic Allowance= 35.0 = 455.0 CLASS Basic Salary Experience Years Enter the basic salary of employee (2):500 Enter the class of employee (2):1 Enter experience years for employee(2):20 ---emp(2)--- = 500 = 20 Basic Salary Experience Years Technical Allowance = 100.0 Gross salary Retirement Deduction=40.50 Net salary CLASS = 1 Basic Allowance= 75.0 = 675.0 = 634.5 ------- Enter the basic salary of employee (3):400 Enter the class of employee Enter experience years for employee(3):8 ------------------emp(3)------- Basic Salary Experience Years Technical Allowance = 48.0 Gross salary Retirement Deduction=0.00 (3):3 = 3 Basic Allowance = 60.0 = 508.0 = 508.0 = 400 = 8 CLASS Net salary ----------- ------- Average of all net salaries =518.85
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning