Skip to content

Instantly share code, notes, and snippets.

@lgolubyev
Created May 24, 2022 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lgolubyev/0270e9fba601a0073ab356d6dc5beb89 to your computer and use it in GitHub Desktop.
Save lgolubyev/0270e9fba601a0073ab356d6dc5beb89 to your computer and use it in GitHub Desktop.
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