-
-
Save conanak99/d648a1f48774f6b5c752e19b1a0a2878 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 IAnimal { | |
void Eat(); | |
... | |
void Swim(); | |
void Fly(); | |
} | |
public class Fish : IAnimal { | |
public void Eat () {} | |
... | |
public void Swim() {} | |
public void Fly() { throw new Exception("Cá éo biết bay"); } | |
} | |
public class Bird : IAnimal { | |
public void Eat () {} | |
... | |
public void Swim() { throw new Exception("Chim éo biết bơi"); } | |
public void Fly() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment