Question: QUESTION 3 . 2 ( 2 5 MARKS ) 3 . 2 . Use the case study in Question 3 . 1 Implement three classes
QUESTION MARKS
Use the case study in Question
Implement three classes that inherit from the "Employee" abstract class:
a FullTimeEmployee: This class represents a fulltime employee and should include the following additional properties:
double MonthlySalary
Implement the CalculateSalary method to return the monthly salary.
b PartTimeEmployee: This class represents a parttime employee and should include the following additional properties:
double HourlyRate
int HoursWorked
Implement the CalculateSalary method to return the salary based on the hours worked and hourly rate.
c ContractualEmployee: This class represents a contractual employee and should include the following additional properties:
double ContractAmount
Implement the CalculateSalary method to return the contract amount.
d In the main program, create instances of each type of employee fulltime, parttime, and contractual populate their data, and demonstrate the functionality of your implemented methods.
Your solution should demonstrate proper usage of structures, interfaces, abstract classes, and inheritance principles in C# Ensure that user input is handled appropriately and that meaningful output is provided.
MARKS
NOTE: code in C#
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
