Question: Use C# to write this program: The Tiny Company has two types of employees: fulltime and parttime. Both types have an employee ID and employee

Use C# to write this program: The Tiny Company has two types of employees: fulltime and parttime. Both types have an employee ID and employee name. Fulltime employees have a salary, and parttime employees have an hourly wage and hours worked.
A full time employee gets paid weekly by dividing the salary by 52 while a part time employee gets paid by the product of hourly wage and hours worked.
Specifically, you will create an Employee class with the common elements (employee ID, employee name, ToString() method). Then create a Fulltime employee class with a salary field and teh GetWeeklyPaid() method. Similarly, create a Parttime employee class with hourly wage and hours worked fields and the GetWeeklyPaid() method. Add appropriate properties, constructors, and ToString() methods. Output must be formatted appropriately. Each class should be in its own cs file. Finally, demonstrate the class in the Main() method of the Program class with data made up for two full time employees and two part time employees in a List of Employee. Display the employee's payment data in a foreach loop.

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!