Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 3 . 2 ( 2 5 MARKS ) 3 . 2 . Use the case study in Question 3 . 1 Implement three classes

QUESTION 3.2(25 MARKS)
3.2. Use the case study in Question 3.1
Implement three classes that inherit from the "Employee" abstract class:
a). FullTimeEmployee: This class represents a full-time 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 part-time 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 (full-time, part-time, 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.
(25 MARKS)
NOTE: code in C#
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

ISBN: 0137916787, 978-0137916788

More Books

Students also viewed these Databases questions

Question

Please make it fast 3 5 1 .

Answered: 1 week ago