-
-
Save tnngo2/7856dad9ccfe58aaa0da 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
interface ITerrestrialAnimal | |
{ | |
void Eat(); | |
} | |
interface IMarineAnimal | |
{ | |
void Swim(); | |
} | |
class Crocodile:ITerrestrialAnimal, IMarineAnimal | |
{ | |
static void Main(string[] args) | |
{ | |
Crocodile objCrocodile = new Crocodile(); | |
objCrocodile.Eat(); | |
objCrocodile.Swim(); | |
} | |
public void Eat() | |
{ | |
Console.WriteLine("The crocodile eats flesh"); | |
} | |
public void Swim() | |
{ | |
Console.WriteLine("The crocodile can swim"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment