Skip to content

Instantly share code, notes, and snippets.

@conanak99

conanak99/i3.cs Secret

Last active June 9, 2016 09:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save conanak99/0ac98ce0cc3bdf6d6562955354b5aeac to your computer and use it in GitHub Desktop.
public interface IAnimal {
void Eat();
void Drink();
void Sleep();
}
public interface IBird {
void Fly();
}
public interface IFish {
void Swim();
}
// Các class chỉ cần kế thừa những interface có chúc năng chúng cần
public class Dog : IAnimal {
public void Eat() {}
public void Drink() {}
public void Sleep() {}
}
public class FlappyBird: IAnimal, IBird {
public void Eat() {}
public void Drink() {}
public void Sleep() {}
public void Fly() {}
}
public class FormosaFish: IAnimal, IBird {
public void Eat() {}
public void Drink() {}
public void Sleep() {}
public void Swim() {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment