using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HerancaConstrutor
{

    class ClasseBase
    {
        public ClasseBase()
        {
            Console.WriteLine("parameterless constructor da classe ClasseBase");
        }
    }

    class DerivadaSemConstructor : ClasseBase
    {
        
    }


    class DerivadaComConstructor : ClasseBase
    {
        public DerivadaComConstructor()
        {
            Console.WriteLine("parameterless constructor da classe DerivadaComConstructor");
        }

        public DerivadaComConstructor(string argumento)
        {
            Console.WriteLine("constructor com argumentos da classe DerivadaComConstructor. Argumento: " + argumento);
        }
    }


    class DerivadaDaDerivadaSemConstructor : DerivadaSemConstructor
    {
        
    }

    class DerivadaDaDerivadaComConstructor : DerivadaComConstructor
    {
        public DerivadaDaDerivadaComConstructor()
            : base("")
        {
            Console.WriteLine("parameterless constructor da classe DerivadaDaDerivadaComConstructor");
        }

        public DerivadaDaDerivadaComConstructor(string argumento) : base(argumento)
        {
            Console.WriteLine("constructor com argumentos da classe DerivadaDaDerivadaComConstructor. Argumento: " + argumento);
        }
    }


    class Program
    {
        static void Main(string[] args)
        {
            var v1 = new ClasseBase();

            var v2 = new DerivadaSemConstructor();
            var v3 = new DerivadaComConstructor();
            var v3b = new DerivadaComConstructor("b");

            var v4 = new DerivadaDaDerivadaSemConstructor();
            var v5 = new DerivadaDaDerivadaComConstructor();
            var v5b = new DerivadaDaDerivadaComConstructor("b");
        }
    }
}
