Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Main Method: static void Main(string[] args) { Employee[] emps = { new Employee( Robert, John, 6611 ), new Faculty(Sara, Brown, 2010, CSC), new Instructor(Steven, Hank,
Main Method:
static void Main(string[] args)
{
Employee[] emps = {
new Employee( "Robert", "John", 6611 ),
new Faculty("Sara", "Brown", 2010, "CSC"),
new Instructor("Steven", "Hank", 3344, "ECE", 20)
};
foreach (Employee e in emps)
e.Print();
Console.WriteLine("-----------------------------------------");
emps[0].EmployeeNumber = 331;
Console.WriteLine(emps[0].EmployeeName + ": " + emps[0].EmployeeID);
}
Class Diagram:
Expected Output:
1- Create 3 classes Employee, Faculty, and Instructor as shown in the class diagram below. 2- Faculty should inherit Employee and Instructor should inherit Faculty. 3- Apply the concept of least privilege. All your data members must be private. 4- Do not define any new data members in any class. However, you are allowed to define private methods. 5- Implement whatever accessors (set/get) necessary. 6- Note that the Employee Number is a 4-digit number, the ID is dynamically constructed asStep 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