static void Main(string[] args) { var commonPrint = new Printer(); var photoPrint = new PhotoPrinter(); var colorPrint = new ColourPrinter(); commonPrint.Print("COMMON PRINTER\n"); photoPrint.Print("Photo Printer", "Mountains\n"); colorPrint.Print("Colour Printer", ConsoleColor.Cyan); Console.ReadKey(); }
static void Main(string[] args) { var printer = new Printer(); var colourPrinter = new ColourPrinter(); var photoPrinter = new PhotoPrinter(); object photo = "photo"; Console.WriteLine("Printer"); printer.Print("Some Text"); Console.WriteLine("------------------"); Console.WriteLine("Coluor Printer"); colourPrinter.Print("Some Text", ConsoleColor.Red); Console.WriteLine("------------------"); Console.WriteLine("Photo Printer"); photoPrinter.Print(photo); Console.ReadLine(); }