Example #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();
        }
Example #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();
        }
Example #4
0
        static void Main()
        {
            Puppy puppy = new Puppy();

            puppy.Eat();
            puppy.Bark();
            puppy.Weep();
        }
Example #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();
        }
Example #7
0
        public static void Main()
        {
            var puppy = new Puppy();

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

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

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

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

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

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

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

            puppy.Eat();
            puppy.Bark();
            puppy.Weep();
            Console.ReadLine();
        }
Example #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();
        }
Example #17
0
        static void Main(string[] args)
        {
            Dog sharo = new Dog();

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

            Puppy lover = new Puppy();

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

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

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

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

            Cat sharo2 = new Cat();

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

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

            puppy.Eat();
            puppy.Bark();
            puppy.Weep();
        }
Example #21
0
        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();
        }
Example #23
0
        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();
        }
Example #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();
        }
Example #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();
        }
Example #26
0
        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();
        }
Example #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();
        }