Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started