Question: 3 . Case study: Suppose you are tasked with designing a C# program to manage company employees. The requirements include defining different types of employees,
Case study: Suppose you are tasked with designing a C# program to manage company employees. The requirements include defining different types of employees, such as fulltime, parttime, and contractual, each with specific attributes and behaviors. Implement the necessary structures, interfaces, abstract classes, and inheritance to fulfill these requirements.
a Define a structure named Address with the following fields:
string Street
string City
string State
int ZipCode
b Define an interface named IEmployee with the following methods:
void DisplayDetails: This method should display the employee's details.
double CalculateSalary: This method should calculate and return the employee's salary.
c Define an abstract class named Employee that implements the IEmployee interface and has the following properties and methods:
Properties:
int EmployeeId
string FullName
Address EmployeeAddress
Methods:
abstract double CalculateSalary: This method should be implemented by derived classes to calculate the salary of specific types of employees.
Virtual void DisplayDetails: This method should display the employee's details.
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
