Created
June 22, 2016 21:41
-
-
Save w3cj/571b0538d731c1a723d8c173d088bf00 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
using System; | |
namespace Galvanize | |
{ | |
abstract class Animal | |
{ | |
public abstract string poop(); | |
} | |
class Dog : Animal | |
{ | |
public override string poop() | |
{ | |
return "π©π©ππ©π©"; | |
} | |
} | |
class Cat : Animal | |
{ | |
public override string poop() | |
{ | |
return "π©π©π©ππ©π©π©"; | |
} | |
} | |
class AnimalDayCare | |
{ | |
public void WalkAnimal(Animal animal) | |
{ | |
Console.WriteLine(animal.poop()); | |
} | |
} | |
class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
AnimalDayCare dayCare = new AnimalDayCare(); | |
Cat kitten = new Cat(); | |
dayCare.WalkAnimal(kitten); | |
Dog doggy = new Dog(); | |
dayCare.WalkAnimal(doggy); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment