Example #1
0
        static void Main1c(string[] args)
        {
            Printer1 printer = new Printer1();
            User1b   u1      = new User1b(printer);
            User1b   u2      = new User1b(printer);

            printer.PageOver();
        }
Example #2
0
        static void Main1b(string[] args)
        {
            Printer1 printer = new Printer1();
            User1b   u1      = new User1b(printer);
            User1b   u2      = new User1b(printer);

            Console.WriteLine("Please enter pages to print:");
            int x = int.Parse(Console.ReadLine());

            printer.Print(x);
        }
Example #3
0
 public User1b(Printer1 printer)
 {
     number            = ++counter;
     myPrinter         = printer;
     printer.PageOver += myPageOver;
 }