ABC company Ltd. is interested to computerize the pay calcuation of their employee in the form of Basic pay, Dearness Allowance (DA) and House Rent Allowance (HRA). DA and HRA are calculated as certain % of Basic pay (For example, DA is 80% of Basic pay, and HRA is 30% of Basic pay). They have the deduction in the salary as PF which is 12% of Basic pay. Propose a computerized solution for the above said problem.
Question
ABC company Ltd. is interested to computerize the pay calcuation of their employee in the form of Basic pay, Dearness Allowance (DA) and House Rent Allowance (HRA). DA and HRA are calculated as certain % of Basic pay (For example, DA is 80% of Basic pay, and HRA is 30% of Basic pay). They have the deduction in the salary as PF which is 12% of Basic pay. Propose a computerized solution for the above said problem.
Solution
To computerize the pay calculation for ABC company Ltd., we can propose the following steps:
- Input the Basic pay for each employee.
- Calculate the Dearness Allowance (DA) by multiplying the Basic pay by the given percentage (e.g., 80%).
- DA = Basic pay * 80%
- Calculate the House Rent Allowance (HRA) by multiplying the Basic pay by the given percentage (e.g., 30%).
- HRA = Basic pay * 30%
- Calculate the Provident Fund (PF) deduction by multiplying the Basic pay by the given percentage (e.g., 12%).
- PF deduction = Basic pay * 12%
- Calculate the Net pay by subtracting the PF deduction from the sum of Basic pay, DA, and HRA.
- Net pay = (Basic pay + DA + HRA) - PF deduction
By following these steps, the pay calculation for each employee can be computerized, ensuring accurate and efficient calculations.
Similar Questions
Problem StatementShyam works at a company where his gross salary is calculated based on his basic salary along with other allowances. The company provides him with a Dearness Allowance (DA) of 10% and a Travel Allowance (TA) of 12%. Given Shayam's basic salary, write a program to calculate his gross salary. Note: This question was asked in Wipro coding test.Input format :The input consists of an integer N, representing Shyam's basic salary.Output format :The output prints "Gross Salary = " followed by an integer representing Shyam's gross salary.Refer to the sample output for formatting specifications.Code constraints :1000 ≤ N ≤ 50000Sample test cases :Input 1 :1280Output 1 :Gross Salary = 1561Input 2 :35750Output 2 :Gross Salary = 43615Input 3 :50000Output 3 :Gross Salary = 61000Note :The program will be evaluated only after the “Submit Code” is clicked.Extra spaces and new line characters in the program output will result in the failure of the test case.
Amazon has recently updated the salary structure for its employees in various designations. The employees are classified into three main groups: Project Managers, System Engineers, and Technical Assistants. Each designation has different allowances added to their basic pay(if basic pay=0, then salary=0). Project Managers receive all allowances(Additional Grade Pay, Dearness Allowance) except Travel Allowances (TA). System Engineers receive only basic pay, House Rental Allowance and TA, while Technical Assistants receive only fixed basic pay without any allowances. Implement this salary scheme in a C++ program where the base class Employee represents all employees' common attributes and behaviours. ProjectManager, SystemEngineer, and TechnicalAssistant should be derived classes from Employee. The Employee class should have a constructor to initialize common attributes like name and basic pay, and each derived class should have its own constructor to initialize its specific attributes. Write a main() function to display the salary with respective class objects. Sample input John Smith 5000 1000 500 Emily Johnson 4000 300 800 Michael Brown 3000 Sample output 6500 5100
Create the class Employee with name, Empid, address, mailid, mobileno as data members.Inherit the classes programmer,Asstprofessor, Associateprofessor and Professor from employee class.Add Basic Pay (BP) as the member of all the inherited classes..Calculate DA as 97% of BP, HRA as 8% of BP, PF as 10% of BP, Staff club fund as 0.1% of BP.Calculate gross salary and net salary.Generate payslip for programmer categories of employees.Calculate DA as 97% of BP, HRA as 10% of BP, PF as 12% of BP, Staff club fund as 0.1% of BP.Calculate gross salary and net salary.Generate payslip for Asstprofessor categories of employees.Calculate DA as 97% of BP, HRA as 7% of BP, PF as 13% of BP, Staff club fund as 0.1% of BP.Calculate gross salary and net salary.Generate payslip for Associateprofessor categories of employees, Create the objects for the inherited classes and invoke the necessary methods to display the Payslip.Calculate DA as 97% of BP, HRA as 4% of BP, PF as 13% of BP, Staff club fund as 0.2% of BP.Calculate gross salary and net salary.Generate payslip for Professor categories of employees,Choose the options 1.PROGRAMMER 2.ASSISTANT PROFESSOR 3.ASSOCIATE PROFESSOR 4.PROFESSORinput2Arun [email protected], Anna Nagar, Chennai-6550029876543210 20000outputArun [email protected] 12, Anna Nagar, Chennai65987654321020000.019400.02000.02400.02000.041400.037000.0
Create a class Employee with members name and ID and a default constructor to read the details of employeeCreate a derived class Salary from employee with members basic pay. Create a default constructor to read the basic pay.Create a derived class loan from salary with members DA,HRA,loan_amout, net_pay.Create a default constructor to read the loan_amount. Define a member function to calculate the netpay.Net_pay= (basic_pay+DA+HRA)-loan_amountDA=30% of basic payHRA =12% of basic pay
Write a program to prompt the user for hours and rate per hour using input to compute gross pay. Pay should be the normal rate for hours up to 40 and time-and-a-half for the hourly rate for all hours worked above 40 hours. Put the logic to do the computation of pay in a function called computepay() and use the function to do the computation. The function should return a value. Use 45 hours and a rate of 10.50 per hour to test the program (the pay should be 498.75). You should use input to read a string and float() to convert the string to a number. Do not worry about error checking the user input unless you want to - you can assume the user types numbers properly. Do not name your variable sum or use the sum() function.
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.