Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MAKE SURE TO CREATE A PAYROLL CLASS. WITH __INIT__. AND CONSTRUCTOR CALPAY() and DISPLAY() Hal owns a business named Make Your Own Music, which sells
MAKE SURE TO CREATE A PAYROLL CLASS. WITH __INIT__. AND CONSTRUCTOR CALPAY() and DISPLAY()
Hal owns a business named Make Your Own Music, which sells guitars, drums, banjos, synthesizers, and many other musical instruments. Hal's sales staff works strictly on commission. At the end of the month, each salesperson's commission is calculated according to Table 5-1. Because the staff gets paid once per month, Hal allows each employee to take up to $2,000 per month in advance. When sales commissions are calculated, the amount of each employee's advanced pay is subtracted from the commission. If any salesperson's commissions are less than the amount of their advance, they must reimburse Hal for the difference. To calculate a salesperson's monthly pay, Hal uses the following formula: pay=salescommissionrateadvancedpay Hal has asked you to write a program that makes this calculation for him. general algorithm outlines the steps the program must take. Create a PyCharm project named as "HalBusiness". In this project: First, create a class called "Payroll" including attributes (employee's id, employee's first name, employee's las name, sales amount, advanced pay etc.) and methods: construtor _init__, calPay(), display(). The __init_._ needs to initilize the attributes. The calPay() receives the sales amount and advanced pay and then calculate the commission rate and the pay, return the pay. The display() will display the payroll information for each employee. Second create a test module named "PayTester" to test the functions. Requirments for your submission: 1) UML design of Payroll class 2) Follow the program template: documentation and attach testing runs dataStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started