Last active
November 1, 2017 21:17
-
-
Save profesor79/2e1de052de5d64698f7dd2e59ee26896 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
public class Cat : Animal | |
{ | |
public Cat(){ | |
base.Sound = "miau miau"; | |
} | |
} | |
public abstract class Animal | |
{ | |
public string Name { get; set; } | |
public string Sound { get; set; } | |
public string AboutMe(){ | |
return $"{Name}, {Sound}"; | |
} | |
} | |
public List<Animal> MakeAnimal(AnimalType animalType, string[] animalName) | |
{ | |
List<Animal> animalList = new List<Animal>(); | |
switch (animalType) | |
{ | |
case AnimalType.cat: | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment