Beispiel #1
0
        public void CheckRovdyr()
        {
            if (status == false)
            {
                Dyreliste.Clear();
                listcount = 1;
                Dyreliste.Add("ID: Art:");
                Console.Clear();
            }
            Løver   løver   = new Løver();
            Tiger   tiger   = new Tiger();
            Leopard leopard = new Leopard();

            count = løver.getcount();
            name  = løver.getname();
            AddToList();
            count = tiger.getcount();
            name  = tiger.getname();
            AddToList();
            count = leopard.getcount();
            name  = leopard.getname();
            AddToList();
        }
        static void Main(string[] args)
        {
            Fish     newFish    = new Fish("Nemo", false, 4);
            Crow     newCrow    = new Crow("Poe", 14, "black");
            Owl      newOwl     = new Owl("Hedwig", 24);
            Leopard  newLeopard = new Leopard("Treecat", 11, true);
            Lion     newLion    = new Lion("Alex", 16);
            Hound    newHound   = new Hound("Sam", 10);
            Labrador newLab     = new Labrador("Bo", 12);

            Console.WriteLine(newFish.Swim());

            Console.WriteLine(newCrow.Fly());

            Console.WriteLine(newOwl.Sleep());

            Console.WriteLine(newLeopard.PetHuman());

            Console.WriteLine(newLion.Purr());

            Console.WriteLine(newHound.Poop());

            Console.WriteLine(newLab.Bark());
        }