Home / Expert Answers / Computer Science / in-c-multiple-pics-sample-output-provided-1-c-employee-inheritance-implement-inheritance-as-d-pa155

(Solved): in C#, multiple pics, sample output provided 1. C\#: Employee Inheritance Implement inheritance as d ...



in C#, multiple pics, sample output provided
1. C\#: Employee Inheritance
Implement inheritance as described below.
Create an abstract class Employee that has the followi
Create a class FinanceEmployee that inherits from the above class Employee. It has the following:
1. A constructor function t
- Sample Case 0
Sample Input For Custom Testing
Sam Seattle
Jane Miami
Sample Output
FinanceEmployee info: Department - Finan
Eric Florida
Sample Output
FinanceEmployee info: Department - Finance, Name - Lupita, Location - Texas Lupita is not on vacat
1. C\#: Employee Inheritance Implement inheritance as described below. Create an abstract class Employee that has the following: 1. A member variable department [string] 2. A member variable name [string] 3. A member variable location [string] 4. A member variable isonvacation [boolean] (default status value is false) 5. A constructor function that takes 3 parameters and assigns them to department, name, and location respectively 6. A member function GetDepartment() that returns the value department 7. A member function GetName() that returns the value name 8. A member function GetLocation() that returns the value location 9. A member function Getstatus() that returns the value isonvacation 10. A member function Switchstatus() that toggles the isonvacation value Create a class FinanceEmployee that inherits from the above class Employee. It the following: 1. A constructor function that takes 2 parameters, name and location. It calls the ba: Create a class FinanceEmployee that inherits from the above class Employee. It has the following: 1. A constructor function that takes 2 parameters, name and location. It calls the base class constructor with department value 'Finance', name, and location respectively. Create a class MarketingEmployee that inherits from the above class Employee. It has the following: 1. A constructor function that takes 2 parameters, name and location. It calls the base class constructor with department value 'Marketing', name, and location respectively. Your implementation of the function will be tested by a stubbed code on several input files. Each input file contains parameters for the function calls. The functions will be called with those parameters, and the result of their executions will be printed to the standard output by the stubbed code. - Sample Case 0 Sample Input For Custom Testing Sam Seattle Jane Miami Sample Output FinanceEmployee info: Department - Finance, Name - Sam, Location - Seattle Sam is not on vacation Switching Sam is on vacation Switching Sam is not on vacation Marketingemployee info: Department - Marketing, Name - Jane, Location - Miami Jane is not on vacation Switching Jane is on vacation Switching Jane is not on vacation Explanation First, an employee object is created with department "Finance", name "Sam", location "Seattle", and isOnVacation false. Then, all 4 functions are called: GetDepartment, GetName, Getlocation, and GetStatus. The result is printed to the standard output. Then, the function SwitchStatus is called, followed by GetStatus, and the result is printed to the standard output. Finally, the function SwitchStatus is called again, followed by GetStatus, and the result is printed to the standard output. The same operations are performed for the second employee object. Eric Florida Sample Output FinanceEmployee info: Department - Finance, Name - Lupita, Location - Texas Lupita is not on vacation Switching Lupita is on vacation Switching Lupita is not on vacation MarketingEmployee info: Department - Marketing, Name - Eric, Location - Florida Eric is not on vacation Switching Eric is on vacation Switching Eric is not on vacation Explanation First, an employee object is created with department "Finance", name "Lupita", location "Texas", and isOnvacation false. Then all 4 functions are called: GetDepartment, GetName, GetLocation, and Getstatus. The result is printed to the standard output. Then, the function SwitchStatus is called, followed by Getstatus, and the result is printed to the standard output. Finally, the function SwitchStatus is called again, followed by GetStatus, and the result is printed to the standard output. The same operations are performed for the second employee object.


We have an Answer from Expert

View Expert Answer

Expert Answer


The code in C# of implementation of inheritance :using System;abstract class Employee{ protected string department; protected string name; pr
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe