Question: 4. Write a script WorkerApp with the following functions: . read file () : Takes a filename as a parameter. Assume each line of the

 4. Write a script WorkerApp with the following functions: . read

4. Write a script WorkerApp with the following functions: . read file () : Takes a filename as a parameter. Assume each line of the file contains the id, name, hourly wage, hours and type of worker(PT) for Part-time workers or id, name, gross salary, foreign language status ('Y', y' or 'N','n'), type of worker(FT) for Full-time workers. The (net) salary of the workers will be calculated and stored in the salary data member. Using data in the file, the method will return a dictionary where the keys are the id numbers and the values are Worker objects (FTWorker or FTWorker)

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 Programming Questions!