Exemple #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            Producto p  = new Producto("0001", "Platanito");
            var      p2 = new Producto("0002", "Mora negra", 0.05m);
            var      p3 = new Producto("0003", "Dentadura", 1);
            var      p4 = new Producto("0004", "fresa");

            Console.WriteLine(p.GetDescripcionProducto());
            Console.WriteLine(p2.GetDescripcionProducto());
            Console.WriteLine(p3.GetDescripcionProducto());
            Console.WriteLine(p4.GetDescripcionProducto());

            var yo      = new Plebeyo("Antonio", "Chamorro", 42, Genero.Hombre, "profe");
            var otro    = new Plebeyo("Juan", "Gomez", 35, Genero.Hombre, "Carpintero");
            var otromas = new Plebeyo("Maria", "Suarez", 32, Genero.Mujer, "Bailarina");

            var duque   = new Aristocrata("Manuel", "Delgado", 55, Genero.Hombre, "Duque");
            var conde   = new Aristocrata("Javier", "De las Heras", 65, Genero.Hombre, "Conde");
            var marques = new Aristocrata("Leonor", "Vinuesa", 25, Genero.Mujer, "Marquesa");

            PrintDatos(yo);
            PrintDatos(duque);
            PrintDatos(otro);
            PrintDatos(marques);
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            Producto p = new Producto("0001", "Platanito");

            var p2 = new Producto("003", "Mora Negra", 0.05m);

            var p3 = new Producto("003", "Dentadura", 1);

            var p4 = new Producto("004", "Fresita", 0.5m);

            Console.WriteLine(p.GetDescripcionProducto());
            Console.WriteLine(p2.GetDescripcionProducto());
            Console.WriteLine(p3.GetDescripcionProducto());
            Console.WriteLine(p4.GetDescripcionProducto());

            var yo = new Plebeyo("Ernesto", "Gimenez", 25, Genero.Hombre, "Informatica");
            var tu = new Plebeyo("Alvaro", "Gimenez", 23, Genero.Hombre, "Informatica");
            var el = new Plebeyo("David", "Gimenez", 29, Genero.Hombre, "Fisio");

            var Señor = new Aristocrata("Ernesto", "Gimenez", 25, Genero.Hombre, "Señor");
            var Don   = new Aristocrata("Alvaro", "Gimenez", 23, Genero.Hombre, "Don");
            var Puto  = new Aristocrata("David", "Gimenez", 29, Genero.Hombre, "Puto");

            PrintDatos(yo);
            PrintDatos(Señor);
            PrintDatos(tu);
            PrintDatos(Don);
        }
Exemple #3
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            Producto p = new Producto("0001", "Platanito");

            // {
            // p.Codigo = "0001";
            //p.Nombre = "Platanito";
            // p.Precio = 5;
            // }

            // var p2 = new Producto()
            // {
            //     Codigo = "0002",
            //     Nombre = "Mora negra",
            //     Precio = 0.05m
            // };

            var p2 = new Producto("0002", "Mora Negra", 0.05m);

            var p3 = new Producto("0003", "Dentadura", 1);

            var p4 = new Producto("0004", "fresa");

            Console.WriteLine(p.GetDescripcionProducto());
            Console.WriteLine(p2.GetDescripcionProducto());
            Console.WriteLine(p3.GetDescripcionProducto());
            Console.WriteLine(p4.GetDescripcionProducto());

            var yo      = new Plebeyo("Mario", "González Beldad", 22, Genero.Hombre, "Ingeniero");
            var otro    = new Plebeyo("Josefa", "La Cerda", 15, Genero.Mujer, "Presentadora");
            var otromas = new Plebeyo("Marco", "Aurelio", 28, Genero.Hombre, "Comandante");


            var duque   = new Aristocrata("Miguel", "Cervantes", 68, Genero.Hombre, "Duque");
            var conde   = new Aristocrata("Javier", "De las Heras", 40, Genero.Hombre, "Conde");
            var marques = new Aristocrata("Luisa", "Hernandez", 32, Genero.Mujer, "Marques");

            PrintDatos(yo);
            PrintDatos(duque);
            PrintDatos(otro);
            PrintDatos(marques);
        }
Exemple #4
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            Producto p = new Producto("0001", "Platanito");
            // p.Codigo = "0001";
            // p.Nombre = "Platanito";
            //p.Precio = 0.10m;

            // var p2 = new Producto()
            // {
            //     Codigo = "0002",
            //     Nombre = "Mora Negra",
            //     Precio = 0.05m
            // };

            var p2 = new Producto("0002", "Mora Negra", 0.05m);

            var p3 = new Producto("0003", "Dentadura", 1);

            var p4 = new Producto("0004", "Fresa");


            Console.WriteLine(p.GetDescripcionProducto());
            Console.WriteLine(p2.GetDescripcionProducto());
            Console.WriteLine(p3.GetDescripcionProducto());
            Console.WriteLine(p4.GetDescripcionProducto());

            var yo      = new Plebeyo("Beatriz", "Ruiz Peces", 25, Genero.Mujer, "Programadora");
            var otro    = new Plebeyo("Gabriel", "Cano Mora", 36, Genero.Hombre, "Electricista");
            var otromas = new Plebeyo("Angel", "Gomez Limon", 27, Genero.Hombre, "Fontanero");

            var duque    = new Aristocrata("Julian", "Muñoz Recio", 57, Genero.Hombre, "Duque");
            var condesa  = new Aristocrata("Isolda", "Heraldo Marques", 28, Genero.Mujer, "Condesa");
            var marquesa = new Aristocrata("Maria", "Santos Tortosa", 41, Genero.Mujer, "Marquesa");

            PrintDatos(yo);
            PrintDatos(otro);
            PrintDatos(duque);
            PrintDatos(marquesa);
        }
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            Producto p  = new Producto("0001", "Platanito");
            var      p2 = new Producto("0002", "Mora negra", 0.05m);
            var      p3 = new Producto("0003", "Dentadura", 1);
            var      p4 = new Producto("0004", "fresa", 0.5m);


            Console.WriteLine(p.GetDescripcionProducto());
            Console.WriteLine(p2.GetDescripcionProducto());
            Console.WriteLine(p3.GetDescripcionProducto());
            Console.WriteLine(p4.GetDescripcionProducto());


            var yo = new Plebeyo("David", "Alañon", 27, Genero.Hombre);

            Console.WriteLine(yo.GetNombreCompleto());

            var duque = new Aristocrata("Manuel", "Delgado", 55, Genero.Hombre, "Conde");

            Console.WriteLine(duque.GetNombreCompleto());
        }