Exemple #1
0
        static void Main(string[] args)
        {
            Cage <Ape>   apeCage   = new Cage <Ape>(CageType.Glass);
            Cage <Tiger> tigerCage = new Cage <Tiger>(CageType.Gitter);
            Ape          ape       = GenericObject.GenerateObject <Ape>(new object[] { "APE", "Bert", CageType.Glass });

            apeCage.AddAnimal(ape);
            Tiger tiger = GenericObject.GenerateObject <Tiger>(new object[] { "TIGER", "Luzifer", CageType.Glass });

            tigerCage.AddAnimal(tiger);
            apeCage.RemoveAnimal(ape);
        }
Exemple #2
0
        static void DisplayNames()
        {
            Human   human   = new Human();
            Whale   whale   = new Whale();
            Dolphin dolphin = new Dolphin();
            SeaLion seaLion = new SeaLion();
            Ape     ape     = new Ape();


            human.GivesBirth();
            dolphin.Sound(dolphin.Name);
            ape.PlaysGames();
            whale.TypeOfEater();
            seaLion.Breathe();
        }