Example #1
0
        private void Start()
        {
            Console.WriteLine("[shop creating expensive computers]");
            ComputerShop expensiveShop = new HighBudgetShop();

            expensiveShop.CreateComputer();

            Console.WriteLine();
            Console.WriteLine("[shop creating cheap computers]");
            ComputerShop cheapShop = new LowBudgetShop();

            cheapShop.CreateComputer();
        }
Example #2
0
    { static void Main(string[] args)
      {             // create a shop where they assemble expensive computers
          Console.WriteLine("[shop creating expensive computers]");
          ComputerShop shop1 = new HighBudgetShop();

          shop1.AssembleMachine();

          Console.WriteLine();

          // create a shop where they assemble cheap computers
          Console.WriteLine("[shop creating cheap computers]");
          ComputerShop shop2 = new LowBudgetShop();

          shop2.AssembleMachine();

          Console.ReadKey();
      }
Example #3
0
        void start()
        {
            Console.WriteLine("[shop creating actual good computers]");
            HighBudgetShop highEndTechShop = new HighBudgetShop();

            highEndTechShop.createComputer();
            highEndTechShop.runComputer();

            Console.WriteLine();
            Console.WriteLine("[shop creating crappy computers]");
            LowBudgetShop crappyTechShop = new LowBudgetShop();

            crappyTechShop.createComputer();
            crappyTechShop.runComputer();

            Console.ReadKey();
        }