Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            try
            {
                //Testing the creation of instances and methods.
                Sheep Frank = new Sheep();
                Frank.MakeNoise();
                Frank.Use();
                Frank.Move();
                Frank.AlternateUse();

                Pig Steve = new Pig(4, 352);
                Steve.Move();
                Steve.Use();
                Steve.AlternateUse();
                Steve.MakeNoise();

                Cow Lucy = new Cow(4, "brown");
                Lucy.Use();
                Lucy.AlternateUse();
                Lucy.Move();
                Lucy.MakeNoise();

                Chicken Carl = new Chicken(8, 18);
                Carl.Move();
                Carl.MakeNoise();
                Carl.Use();
                Carl.AlternateUse();
            }

            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }