-
-
Save lgolubyev/0270e9fba601a0073ab356d6dc5beb89 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IWorkable | |
{ | |
void Work(); | |
} | |
public interface IFeedable | |
{ | |
void Eat(); | |
} | |
public interface IEmployee : IFeedable, IWorkable | |
{ | |
} | |
public class Human : IEmployee | |
{ | |
public void Work() | |
{ | |
// ....working | |
} | |
public void Eat() | |
{ | |
//.... eating in lunch break | |
} | |
} | |
// robot can only work | |
public class Robot : IWorkable | |
{ | |
public void Work() | |
{ | |
// ....working | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment