Question: can you please solve this python coding question . Q2. Create a class Regular Pay that has the following data attributes pay Rate: float (KWD

 can you please solve this python coding question . Q2. Create

can you please solve this python coding question

. Q2. Create a class Regular Pay that has the following data attributes pay Rate: float (KWD per hour) name: String The class should also have: a constructor that initializes the name and pay Rate. a method computePay(hours) that returns the pay for a given amount of time (payRate*hour). . . . Derive a class Hazard Pay from Regular Pay. It has the following extra data attribute: hazard Rate: float It should: have a constructor that initializes the name, pay Rate, and hazardRate overrides the computePay method. The new method should return the amount returned by the superclass method plus the hazardRate*hour. . Create a testing class for your main program. In this class print a menu to ask the user to enter the information of the employees as shown in the output. Each employee should be added to a list whenever created. You should also allow the user to choose to print all employees' info, compute payment of one employee, exit the program. Refer to the sample output in next page. Sample output What would you like to do? 1- Add Regular Pay employee 2- Add Hazard Pay employee 3- Print employees info 4- Compute payment 5- Exit 1 Enter employee name: Aisha Enter pay rate: 5 What would you like to do? 1- Add Regular Pay employee 2- Add Hazard Pay employee 3- Print employees info 4- Compute payment 5- Exit 3 The employees are: Aisha What would you like to do? 1- Add Regular Pay employee 2- Add Hazard Pay employee 3- Print employees info 4- Compute payment 5- Exit 2 Enter employee name: maryam

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!