Beispiel #1
0
        static void Main(string[] args)
        {
            CreateSweepstakesManager newManager = new CreateSweepstakesManager();
            ISweepstakesManager      manager    = newManager.CreateManager();
            MarketingFirm            firm       = new MarketingFirm(manager);


            firm.CreateSweepstakes();

            firm.CreateSweepstakes();
            firm.CreateSweepstakes();
            firm.GetSweepstakes();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            ISweepstakesManager manager       = SweepstakesFactory.ChooseYourSweepstakesManagerStyle();
            MarketingFirm       marketingFirm = new MarketingFirm(manager);

            marketingFirm.CreateSweepstakes();
            marketingFirm.RunSweepstakes();
        }
Beispiel #3
0
        public void CreateMarketingFirm()

        {
            Console.WriteLine("Do you want a stack or queue?");
            string userInput = Console.ReadLine();
            ISweepstakesManager chosenManager = ManagerFactory(userInput);
            MarketingFirm       marketingFirm = new MarketingFirm(chosenManager);

            marketingFirm.CreateSweepstakes();
        }