Write a Python code for the payroll system of Employees in a company as follows: The...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a Python code for the payroll system of Employees in a company as follows: The program should have 4 classes: 1- Employee class: 5 points Use init () for initializing the attributes of the class: name, id Define a method gross_pay(): it does nothing in this class Overload the method str both name and id must be printed (), format the information of the employee as you like.. 2- SalariedEmployee class: for employees who are paid a monthly salary only It inherits the Employee class Use init () for initializing the attributes of the class: name, id, salary O Note: The initialization of name and id should be used from the super class Define a method gross_pay(): it returns the salary of an employee Overload the method str (), format the information of the employee as you like.. name, id and salary must be printed 3- Commission Employee class: for employees who are paid based on a commission rate of their sales It inherits the Employee class Use init () for initializing the attributes of the class: name, id, com_rate, sales O Note: The initialization of name and id should be used from the super class Define a method gross_pay(): it returns the amount that the employee is paid: rate*sales Overload the method str (), format the information of the employee as you like.. name, id, com_rate, sales must be printed 4- Salaried Commission Employee class: for employees who are paid a monthly salary and also a rate of their sales It inherits the Commission Employee class Use init () for initializing the attributes of the class: name, id, com_rate, sales, salary o Note: The initialization of name,id, com_rate and sales should be used from the super class Define a method gross_pay(): it returns the amount that the employee is paid, which is salary+ the gross_pay of the super class Overload the method str (), format the information of the employee as you like.. name, id, com_rate,sales, and salary must be printed Write a Python code for the payroll system of Employees in a company as follows: The program should have 4 classes: 1- Employee class: 5 points Use init () for initializing the attributes of the class: name, id Define a method gross_pay(): it does nothing in this class Overload the method str both name and id must be printed (), format the information of the employee as you like.. 2- SalariedEmployee class: for employees who are paid a monthly salary only It inherits the Employee class Use init () for initializing the attributes of the class: name, id, salary O Note: The initialization of name and id should be used from the super class Define a method gross_pay(): it returns the salary of an employee Overload the method str (), format the information of the employee as you like.. name, id and salary must be printed 3- Commission Employee class: for employees who are paid based on a commission rate of their sales It inherits the Employee class Use init () for initializing the attributes of the class: name, id, com_rate, sales O Note: The initialization of name and id should be used from the super class Define a method gross_pay(): it returns the amount that the employee is paid: rate*sales Overload the method str (), format the information of the employee as you like.. name, id, com_rate, sales must be printed 4- Salaried Commission Employee class: for employees who are paid a monthly salary and also a rate of their sales It inherits the Commission Employee class Use init () for initializing the attributes of the class: name, id, com_rate, sales, salary o Note: The initialization of name,id, com_rate and sales should be used from the super class Define a method gross_pay(): it returns the amount that the employee is paid, which is salary+ the gross_pay of the super class Overload the method str (), format the information of the employee as you like.. name, id, com_rate,sales, and salary must be printed
Expert Answer:
Related Book For
Java How To Program Late Objects Version
ISBN: 9780136123712
8th Edition
Authors: Paul Deitel, Deitel & Associates
Posted Date:
Students also viewed these programming questions
-
the Q question 1)Building a MultiThreaded Web Server In this lab we will develop a Web server in two steps. In the end, you will have built a multithreaded Web server that is capable of processing...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Rainbow manufactures wooden backyard playground equipment. Rainbow estimated $1,785,000 of manufacturing overhead and $2,100,000 of direct labour cost for the year. After the year was over, the...
-
Commercial banks use some funds to purchase securities and other funds to make loans. Why are the securities more marketable than loans in the secondary market?
-
If the simple CAPM is valid, which of the following situations are possible? Explain. Consider each situation independently. Portfolio Expected Retu Beta Risk-free Market .10 .18 .16 1.0 1.5
-
Determine the probability mass function of \(X\) from the following cumulative distribution function: \[ F(x)=\left\{\begin{array}{lr} 0 & x. \] Figure 3.3 displays a plot of \(F(x)\). From the plot,...
-
Company R purchases a 25% interest in Company E on January 1, 2010, at its book value of $20,000. From 2010 through 2014, Company E earns a total of $200,000. From 2015 through 2019, it loses...
-
8. Provide reasons why each of the following is not an inner product on the given vector spaces. (a) ((a, b), (c, d)) = = ac - bd on R. (b) (A, B)=tr(A + B) on M2x2(R). (c) (f(x), g(x)) = f f'(t)g(t)...
-
A couple acts on the handles of a steering system as shown in Figure 5. The moment applied by the couple about the z axis is zero for the position shown. F= 200i-110j-80k kN. Determine the distance...
-
For the following examples, state what the correct value is and what accounting concept justifies your answer: a. NYU Health bought a magnetic resonance imaging (MRI) machine worth $1,500,000, but...
-
What is capital structure? Why should health care organizations care about it?
-
Explain how the ledger provides the information needed to prepare the operating statement.
-
Why might too much liquidity be a problem for an organization? Why might too little be a problem?
-
How do investors make money on an organizations stock?
-
Regarding a classified balance sheet, which of the following statements is correct? A). Assets are listed in the order of their liquidity. B). Assets are listed in alphabetical order. C). Account...
-
Let (x) = x 2 - 9, g(x) = 2x, and h(x) = x - 3. Find each of the following. (((--) 2
-
Write a program that takes a whole number input from a user and determines whether its prime. If the number is not prime, display its unique prime factors. Remember that a prime numbers factors are...
-
Combine the statements that you wrote in Exercise 3.5 into a Java application that calculates and prints the sum of the integers from 1 to 10. Use a while statement to loop through the calculation...
-
Write an application that simulates coin tossing. Let the program toss a coin each time the user chooses the Toss Coin menu option. Count the number of times each side of the coin appears. Display...
-
Normal (nonmutant) tumor-suppressor genes often function a. as negative regulators of cell division. b. in the maintenance of genome integrity. c. in the stimulation of cell division. d. as both a...
-
The underlying cause(s) of epigenetic changes associated with cancer may be a. mutations in genes that encode chromatin-modifying proteins. b. environmental agents that alter the function of...
-
Most forms of cancer involve a. the activation of a single oncogene. b. the inactivation of a single tumor-suppressor gene. c. the activation of multiple oncogenes. d. the activation of multiple...
Study smarter with the SolutionInn App