Beispiel #1
0
        static void Main()
        {
            //Single Inheritance
            //Dog dog = new Dog();
            //dog.Bark();
            //dog.Bark();
            //==================================
            Console.WriteLine();

            //Multiple Inheritance
            Puppy puppy = new Puppy();

            puppy.Eat();
            puppy.Bark();
            puppy.Weep();
            //=================================
            Console.WriteLine();

            //Hierarchical Inheritance
            Dog dog = new Dog();

            dog.Bark();
            dog.Bark();

            Console.WriteLine();

            Cat cat = new Cat();

            cat.Eat();
            cat.Meow();
        }
Beispiel #2
0
        public static void Main()
        {
            // Problem 1: Single inheritance
            Dog dog = new Dog();

            dog.Bark();
            dog.Eat();
            Console.WriteLine(SEPARATOR);

            // Problem 2: Multiple inheritance
            Puppy puppy = new Puppy();

            puppy.Eat();
            puppy.Bark();
            puppy.Weep();
            Console.WriteLine(SEPARATOR);

            // Problem 3: Hierarchical inheritance
            Dog otherDog = new Dog();

            otherDog.Eat();
            otherDog.Bark();

            Cat cat = new Cat();

            cat.Eat();
            cat.Meow();
        }
        static void Main(string[] args)
        {
            Puppy puppy = new Puppy();

            puppy.Weep();
            puppy.Weep();
        }
Beispiel #4
0
        static void Main()
        {
            Puppy puppy = new Puppy();

            puppy.Eat();
            puppy.Bark();
            puppy.Weep();
        }
Beispiel #5
0
        public static void Main(string[] args)
        {
            Puppy bobcho = new Puppy();

            bobcho.Eat();
            bobcho.Bark();
            bobcho.Weep();
        }
        public static void Main(string[] args)
        {
            Puppy puppy = new Puppy();

            puppy.Eat();
            puppy.Bark();
            puppy.Weep();
        }
Beispiel #7
0
        public static void Main()
        {
            var puppy = new Puppy();

            puppy.Eat();
            puppy.Bark();
            puppy.Weep();
        }
        public static void Main()
        {
            Puppy puppy = new Puppy();

            Console.WriteLine(puppy.Eat());
            Console.WriteLine(puppy.Bark());
            Console.WriteLine(puppy.Weep());
        }
Beispiel #9
0
        static void Main(string[] args)
        {
            var puppy = new Puppy();

            puppy.Eat();
            puppy.Eat();
            puppy.Weep();
        }
Beispiel #10
0
        public static void Main()
        {
            Puppy puppy = new Puppy();

            puppy.Eat();  // eating...
            puppy.Bark(); //barking..
            puppy.Weep(); //weeping..
        }
Beispiel #11
0
        static void Main(string[] args)
        {
            Puppy kira = new Puppy();

            kira.Bark();
            kira.Eat();
            kira.Weep();
        }
Beispiel #12
0
        static void Main(string[] args)
        {
            Puppy pup = new Puppy();

            pup.Bark();
            pup.Eat();
            pup.Weep();
        }
Beispiel #13
0
        static void Main(string[] args)
        {
            Puppy gosheto = new Puppy();

            gosheto.Eat();
            gosheto.Bark();
            gosheto.Weep();
        }
Beispiel #14
0
        static void Main(string[] args)
        {
            Puppy puppy = new Puppy();

            puppy.Eat();
            puppy.Bark();
            puppy.Weep();
            Console.ReadLine();
        }
Beispiel #15
0
        static void Main(string[] args)
        {
            Dog    dog    = new Dog();
            Puppy  puppy  = new Puppy();
            Animal animal = new Animal();


            animal.Eat();
            dog.Eat();
        }
        static void Main(string[] args)
        {
            Dog dog = new Dog();

            dog.Eat();
            dog.Bark();
            Puppy puppy = new Puppy();

            puppy.Weep();
        }
Beispiel #17
0
        static void Main(string[] args)
        {
            Dog sharo = new Dog();

            sharo.Eat();
            sharo.Bark();

            Puppy lover = new Puppy();

            lover.Weep();
        }
Beispiel #18
0
        static void Main(string[] args)
        {
            Puppy puppy = new Puppy();

            puppy.Eat();
            puppy.Bark();
            puppy.Weep();
            Cat cat = new Cat();

            cat.Meow();
        }
Beispiel #19
0
        static void Main(string[] args)
        {
            Puppy sharo = new Puppy();

            sharo.Eat();
            sharo.Bark();
            sharo.Weep();

            Cat sharo2 = new Cat();

            sharo2.Meow();
        }
Beispiel #20
0
        public void Run()
        {
            Dog dog = new Dog();

            dog.Eat();
            dog.Bark();
            Puppy puppy = new Puppy();

            puppy.Eat();
            puppy.Bark();
            puppy.Weep();
        }
        static void Main(string[] args)
        {
            Dog sharo = new Dog();

            sharo.Bark();
            sharo.Eat();

            Puppy puppy = new Puppy();

            puppy.Eat();
            puppy.Bark();
            puppy.Weep();
        }
        static void Main(string[] args)
        {
            Dog rachael = new Dog();

            rachael.Eat();
            rachael.Bark();
            Puppy puppy = new Puppy();

            puppy.Weep();
            Cat bonny = new Cat();

            bonny.Meow();
        }
        static void Main(string[] args)
        {
            Product     product = new Product();
            ShavingFoam foam    = new ShavingFoam();

            foam.Name = "Nivea 2";
            Dog sharo = new Dog();

            sharo.Eat();
            sharo.Bark();

            Puppy goshko = new Puppy();

            goshko.Weep();
        }
Beispiel #24
0
        static void Main(string[] args)
        {
            Animal animal = new Animal();

            animal.Eat();

            Dog dog = new Dog();

            dog.Eat();
            dog.Bark();

            Puppy puppy = new Puppy();

            puppy.Weep();
            puppy.Bark();
            puppy.Eat();
        }
Beispiel #25
0
        static void Main(string[] args)
        {
            Dog dog = new Dog();

            dog.Eat();
            dog.Bark();

            Puppy bo = new Puppy();

            bo.Eat();
            bo.Weep();

            Cat maca = new Cat();

            maca.Eat();
            maca.Meow();
        }
        public void Run()
        {
            Puppy puppy = new Puppy();

            puppy.Eat();
            puppy.Bark();
            puppy.Weep();
            Console.WriteLine();
            Dog dog = new Dog();

            dog.Eat();
            dog.Bark();

            Cat cat = new Cat();

            cat.Eat();
            cat.Meow();
        }
Beispiel #27
0
        static void Main(string[] args)
        {
            Dog dog = new Dog();

            dog.Eat();
            dog.Bark();

            Puppy puppy = new Puppy();

            puppy.Eat();
            puppy.Bark();
            puppy.Weep();

            Cat cat = new Cat();

            cat.Eat();
            cat.Meow();
        }
 public void Weep()
 {
     Console.WriteLine("weeping...");
     Puppy puppy = new Puppy();
 }
        static void Main(string[] args)
        {
            Puppy buki = new Puppy();

            buki.Weep();
        }