Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public abstract class Employee : IEmployee
- {
- public Employee(int workExperience, string fullName)
- {
- WorkExperience = workExperience;
- FullName = fullName;
- }
- public int WorkExperience { get; set; }
- public string FullName { get; set; }
- public abstract void DoWork();
- }
- public class Manager : Employee, IManager
- {
- public Manager(int workExperience, string fullName) : base(workExperience, fullName)
- {
- }
- public override void DoWork()
- {
- GetOrders();
- }
- private void GetOrders()
- {
- Console.WriteLine("Manager is getting orders");
- }
- public void GiveTheTask(string task, IEmployee employee)
- {
- Console.WriteLine($"Manager gives the task: [{task}] to [{employee.FullName}]");
- }
- }
- public interface IManager
- {
- void GiveTheTask(string task, IEmployee employee);
- }
Advertisement
Add Comment
Please, Sign In to add comment