Exemple #1
0
        static void Main(string[] args)
        {
            Printer printer = new Printer();

            printer.Print("hi");

            ColourPrinter cprinter = new ColourPrinter();

            cprinter.Print("hi");
            cprinter.Print("bla", "red");
            Console.WriteLine(cprinter.Text);
            Console.WriteLine(cprinter.Colour);


            PhotoPrinter phprinter = new PhotoPrinter();

            phprinter.Print("hi");
        }
        static void Main(string[] args)
        {
            string test = "Test string";

            Printer printer = new Printer();

            printer.Print(test);

            ColorPrinter colorPrinter = new ColorPrinter();

            colorPrinter.Print(test);
            colorPrinter.Print(test, ConsoleColor.Blue);

            PhotoPrinter photoPrinter = new PhotoPrinter();

            photoPrinter.Print(test);
            photoPrinter.Print(new Photo());
        }