Question

In: Computer Science

Activity Statement-  The Payroll department at xyz company would like you to develop a computer program that...

Activity Statement-  The Payroll department at xyz company would like you to develop a computer program that will determine the net pay of an employee. Design a Python program, which utilizes modules, that asks the user to enter the Name of employee, the total number of hours worked by the employee, and the hourly pay rate of the employee. The program will determine the Employee Gross Pay, the Paid Federal Taxes ( 30% of the Employee Gross Pay ), the Paid State Taxes ( 10% of the Employee Gross Pay ), and the Employee Net Pay ( Gross Pay - Federal Taxes - State Taxes ). In addition, the program will display the following items:

  • Employee Name
  • Employee Total Hours Worked
  • Employee Hourly Pay Rate
  • Employee Paid Federal Taxes
  • Employee Paid State Taxes
  • Employee Net Pay

Activity Instructions-

  1. You have only one attempt to submit. Therefore, be sure that you are submitting and uploading the correct solution. If you submit the wrong version, you will not be allowed to resubmit the solution. It is your responsibility to ensure that you did upload the correct solution!
  2. Launch the Python IDLE program.
  3. Develop the Python program using the following criteria:-
    1. The program consists of seven modules namely, main( ), getEmpInfo( ), computeGrossPay( ), computePaidFedTax( ), computePaidStateTax( ), computeNetPay( ), and printEmpInfo( )
    2. The main( ) module will call the rest of the modules.
    3. The purpose of the getEmpInfo( ) module is to allow the user to enter the employee name, the employee total working hours, and the employee hourly pay rate. The module getEmpInfo( ) is called by the main( ) module.
    4. The purpose of the computeGrossPay( ) module is to compute the employee gross pay. Use the formula Employee Gross Pay = Hours Worked times Hourly pay rate. Please discard any overtime. The computeGrossPay( ) module is called by the main( ) module.
    5. The purpose of the computePaidFedTax( ) module is to compute the amount of money which the employee should pay as a federal tax. Use the formula Employee Paid Federal Taxes = 30% of the Employee Gross Pay. The computePaidFedTax( ) module is called by the main( ) module.
    6. The purpose of the computePaidStateTax( ) module is to compute the amount of money which the employee should pay as a state tax. Use the formula Employee Paid State Taxes = 10% of the employee Gross Pay. The computePaidStateTax( ) module is called by the main( ) module.
    7. The purpose of the computeNetPay( ) module is to compute the employee net pay. Use the formula Employee Net Pay = Employee Gross pay - ( Paid Federal Tax + Paid State Tax ). The computeNetPay( ) module is called by the main( ) module.
    8. The printEmpInfo( ) module is called by the main( ) module. This module should display the following items:
      • Employee Name
      • Employee Total Working Hours
      • Employee Hourly Pay
      • Employee Paid Federal Taxes
      • Employee Paid State Taxes
      • Employee Net Pay

Solutions

Expert Solution

Here Iam providing the code and the output for the given problem.

Code:-

Code in text format:-

def main(): #main fucntion
getEmpInfo()
computeGrossPay()
computePaidFedTax()
computePaidStateTax()
computeNetPay()
printEmpInfo()

def getEmpInfo():
global name, TotalWorkingHours, HourlyRate #varibles
name = input("Enter employee name : ") #taking input from user
TotalWorkingHours = int(input("Enter total working hours : "))
HourlyRate = int(input("Enter HourlyRate : "))
  
def computeGrossPay():
global EmployeeGrossPay
EmployeeGrossPay = HourlyRate * TotalWorkingHours #calculation of EmployeeGrossPay

def computePaidFedTax():
global EmployeePaidFederalTaxes
EmployeePaidFederalTaxes = EmployeeGrossPay * 0.3
  
def computePaidStateTax():
global EmployeePaidStateTaxes
EmployeePaidStateTaxes = EmployeeGrossPay * 0.1

def computeNetPay():
global EmployeeNetPay
EmployeeNetPay = EmployeeGrossPay - (EmployeePaidFederalTaxes + EmployeePaidStateTaxes)

def printEmpInfo():
print("\n") #printing the employee info
print(name + " Is the name of the employee")
print(str(TotalWorkingHours)+ " is the TotalWorkingHours")
print(str(HourlyRate) + " is the HourlyRate")
print(str(EmployeePaidFederalTaxes) + " is the Employee Paid Federal Taxes")
print(str(EmployeePaidStateTaxes) + " is Employee Paid State Taxess")
print(str(EmployeeNetPay) + " is the Employee Net Pay")
main()

  

output:-


Related Solutions

The payroll department would like to see a more structured commencement process established for all new...
The payroll department would like to see a more structured commencement process established for all new hires, as the existing procedures are proving to be inefficient and unreliable. Prepare a brief memo for the Payroll Manager with your recommendation for a new process.
How would I develop a payroll process swimline chart?
How would I develop a payroll process swimline chart?
Utilizing the XYZ Conflict Model, complete the four situations below. Write the XYZ statement you would...
Utilizing the XYZ Conflict Model, complete the four situations below. Write the XYZ statement you would use to resolve the conflict, keeping in mind the goal of maintaining human relations. A co-worker has asked you to go out after work for the second time. The first time you gave an excuse for not being able to go, but you really don’t want to out with this person. What would you say? X Y Z A co-worker keeps coming to your...
Mr. Bailey would like you to start by analyzing the Payroll Office expenses, and allocating the total expenses to each division. He has decided to use the number of payroll checks as the activity base for the allocation.
The following chart shows some basic data for the company:Hourly market rate for staff (the price the company would have to pay from an outsidecontractor for staff services)$100Average hourly cost rate for staff (the average price the company pays to its staff)$50Number of paychecks issued by Audit Division110Number of paychecks issued by Tax Division340Total expense for Payroll Office$31,500Amount of assets invested in Audit Division by BOR CPAs, Inc.$10,000,000Amount of assets invested in Tax Division by BOR CPAs, Inc.$5,000,000PayrollMr. Bailey would...
Think about a administrative program you are with or one that you would like to be...
Think about a administrative program you are with or one that you would like to be part of in Georgia USA and research how that program has been abused by the customer. How did the agency handle it? What safeguards were put into place? Do you agree with the efforts? Why or why not? What would you do to protect the taxpayer's money? Do your research, take up the duty of protecting public funds, and have at it!
Think about a administrative program you are with or one that you would like to be...
Think about a administrative program you are with or one that you would like to be part of in Georgia and research how that program has been abused by the customer. How did the agency handle it? What safeguards were put into place? Do you agree with the efforts? Why or why not? What would you do to protect the taxpayer's money? Do your research, take up the duty of protecting public funds, and have at it!
XYZ Ltd is selling at K45 a share. You would like to buy 200 shares for...
XYZ Ltd is selling at K45 a share. You would like to buy 200 shares for your preferred price of K42 a share using 60% margin. XYZ pays no dividends and the interest rate on a margin loan is 6%. You have two types of orders at your disposal:  Limit buy order  Stop loss order A. Which of the two types of orders would you place to buy XYZ at your preferred price? B. Assuming your order in...
JAVA Program: You are a developer for a company that wants to create a new payroll...
JAVA Program: You are a developer for a company that wants to create a new payroll system. Write a program that can be used to calculate an employee’s take home pay. Example - rmckanryProgram1. Creating a flow chart or using stump code to outline your program first may help. Include the following features in the program: Enter employee’s name Enter employee’s base hourly pay Enter the number of hours worked for the week Error if the hours worked exceeds 168...
Develop a general computer program using MATLAB for the analysis of plane (2D) frames. You can...
Develop a general computer program using MATLAB for the analysis of plane (2D) frames. You can use Chapter 6 as a reference. The program should be able to: a. Analyze a frame subjected to different load types, such as joint load, member load, and support displacement; b. Analyze frames with different boundary conditions: pin, roller, and fixed support; c. Generate the results including joint displacements, member axial, shear and moment forces, and reactions
File Sharing Server A company would like to develop a file share server on the corporate...
File Sharing Server A company would like to develop a file share server on the corporate network. The file share would be used by employees and occasionally by customers, so parts of the file share would be accessible from the Internet. Some employees would share files with each other, but most would simply store files which would only be visible and usable by them. Some employees are in groups which would share files with each other, but those files should...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT