Skip to content

Instantly share code, notes, and snippets.

@conanak99

conanak99/i3.cs Secret

Last active Jun 9, 2016
Embed
What would you like to do?
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
You can’t perform that action at this time.