Beispiel #1
0
        public void CreateMarketingFirmWithManager()
        {
            while (!isDone)
            {
                switch (UserInterface.GetUserInputFor("sweepstakes manager type:\n 1) Queue manager\n 2) Stack manager\n 3) Exit"))
                {
                case "1":
                    manager = new SweepstakesQueueManager();
                    break;

                case "2":
                    manager = new SweepstakesStackManager();
                    break;

                case "3":
                    isDone = true;
                    break;

                default:
                    break;
                }

                MarketingFirm marketingFirm = new MarketingFirm(manager);
                marketingFirm.CreateSweepStakes(UserInterface.GetUserInputFor("sweepstakes name"));
            }
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            ISweepstakesManager manager = ManagerFactory.BuildSweepstakesManager(UI.GetManagerChoice());
            MarketingFirm       firm    = new MarketingFirm(manager);

            firm.Run();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            Simulation simulation = new Simulation();

            simulation.CreateMarketingFirmWithManager();
            MarketingFirm firm = new MarketingFirm();
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            Sweepstakes         sweepstakes        = new Sweepstakes("Llama Party");
            ISweepstakesManager sweepstakesManager = new ISweepstakesManager();

            MarketingFirm.MarketingFirmFactory("");
        }
Beispiel #5
0
        static void Main(string[] args)
        {
            ISweepstakesManager manager = SweepstakeManagerFactory.ChooseStackOrQueue();

            Sweepstakes sweepstake = new Sweepstakes(" Fortnite battlepass!");

            Contestant contestant = new Contestant();

            contestant.SetFirstName("Uma");
            contestant.SetLastName("Bob");
            contestant.SetEmailAdress("*****@*****.**");

            sweepstake.RegisterContestant(contestant);

            Contestant contestant2 = new Contestant();

            contestant2.SetFirstName("Billy");
            contestant2.SetLastName("Bob");
            contestant2.SetEmailAdress("*****@*****.**");

            sweepstake.RegisterContestant(contestant2);

            manager.InsertSweepstakes(sweepstake);

            MarketingFirm firm = new MarketingFirm(manager);

            Console.WriteLine(manager.GetSweepstakes().PickWinner());
            Console.ReadLine();
        }
        static void Main(string[] args)
        {
            ISweepstakesManager manager       = UserInterface.PromptForTypeOfDataStructure();
            MarketingFirm       marketingFirm = new MarketingFirm(manager);

            Console.ReadKey();
        }
        public void ManageCurrentSweepstakes(MarketingFirm firm)
        {
            Console.Clear();
            Sweepstakes sweepstakes = firm.sweepstakesManager.GetSweepstakes();

            Console.WriteLine(sweepstakes.name);
            switch (UI.PromptForCurrentSweepstakesManagementChoice())
            {
            case "1":
                RegisterContestant(sweepstakes);
                ManageCurrentSweepstakes(firm);
                break;

            case "2":
                PrintRegisteredContestants(sweepstakes);
                ManageCurrentSweepstakes(firm);
                break;

            case "3":
                Console.WriteLine(sweepstakes.PickWinner(smtp) + " is the winner.");
                Console.ReadLine();
                firm.sweepstakesManager.EndSweepstakes();
                break;

            case "4":
                break;

            default:
                Console.WriteLine("Invalid entry. Enter a number corresponding to an option");
                Console.ReadLine();
                ManageCurrentSweepstakes(firm);
                break;
            }
        }
Beispiel #8
0
        public static void MainMenu(MarketingFirm marketingFirm)
        {
            bool quit = false;

            do
            {
                Console.WriteLine("Enter 1 to create a sweepstakes. Enter 2 to pull a sweepstakes and check the winner. Enter 3 to quit.");
                input = Console.ReadLine();

                switch (input)
                {
                case "1":
                    marketingFirm.CreateSweepstakes();
                    break;

                case "2":
                    marketingFirm.GetSweepstakes();
                    break;

                case "3":
                    quit = true;
                    break;

                default:
                    break;
                }
            } while (quit == false);
        }
Beispiel #9
0
        static void Main(string[] args)
        {
            MarketingFirm firm = new MarketingFirm(SweepstakeManagerFactory.CreateManager());

            firm.RunSweepstakes();
            firm.FinishSweepstakes();
        }
 //methods
 public void CreateSweepstakes(MarketingFirm marketingFirm, Sweepstakes sweepstakes)
 {
     marketingFirm.InsertSweepstakes(sweepstakes);
     registeredContestants = new Dictionary <int, Contestant>();
     userInterface         = new UI();
     AddContestant();
 }
Beispiel #11
0
        public void CreateMarketingFirmWithManager()
        {
            ISweepstakesManager manager       = UserInterface.GetManagerType();
            MarketingFirm       marketingFirm = new MarketingFirm(manager);

            marketingFirm.CreateSweepstake();
        }
        public void CreateMarketingFirmWithManager()
        {
            UserInterface.PrintStatus("Welcome to the Sweepstakes Manager");
            ISweepstakesManager manager = new ManagerFactory().SelectManager();

            firm = new MarketingFirm(manager);
        }
Beispiel #13
0
        static void Main(string[] args)
        {
            ISweepstakesManager manager       = UI.AskStyleofSweepstakesManager();
            MarketingFirm       marketingFirm = new MarketingFirm(manager);

            Console.ReadLine();
        }
Beispiel #14
0
        static void Main(string[] args)
        {
            Factory       factory = new Factory();
            MarketingFirm market  = new MarketingFirm(factory.ChooseManager());

            market.RunSweepstakes();
        }
        public void CreateMarketingFirmWithManager()
        {
            SweepstakesStackManager Stack = new SweepstakesStackManager();
            MarketingFirm           firm  = new MarketingFirm(Stack);

            firm.CreateSweepstake();
        }
Beispiel #16
0
        static void Main(string[] args)
        {
            ManagerCreator manager       = new ManagerCreator();
            MarketingFirm  marketingFirm = new MarketingFirm(manager.MakeAManager(UserInterface.ChooseManager()));

            marketingFirm.Start();
        }
Beispiel #17
0
        public MarketingFirm CreateMarketingFirmWithManager()
        {
            string        prompt  = "Please enter the name of your management firm";
            string        reply   = UserInterface.GetUserInputForStringPrompt(prompt);
            MarketingFirm mktfrm1 = new MarketingFirm(reply);

            return(mktfrm1);
        }
Beispiel #18
0
 //ctor
 public RunGame()
 {
     //contestant = new Contestant();
     //sweepstakes = new Sweepstakes("name");//whats the proper thing to do with this 'name'
     managerFactory     = new ManagerFactory();
     sweepstakesManager = managerFactory.ChooseSweepstakesManager();
     marketingFirm      = new MarketingFirm(sweepstakesManager);
 }
        static void Main(string[] args)
        {
            MarketingFirm marketingFirm = new MarketingFirm(ManagerFactory.SweepstakesAssign());

            marketingFirm.RunSweepstakes();

            Console.ReadLine();
        }
Beispiel #20
0
        static void Main(string[] args)
        {
            Factory factoryManager = new Factory();

            UserInterface.AskQuestion("Please choose which type of sweepstakes manager you would like. Type either stack or queue.");
            string input = Console.ReadLine().ToLower();
            ISweepstakesManager iManager  = factoryManager.ChooseManagerType(input);
            MarketingFirm       mikesFirm = new MarketingFirm(iManager);
        }
Beispiel #21
0
        static void Main(string[] args)
        {
            DatabaseFactory data = new DatabaseFactory();

            data.SetDatabase();
            MarketingFirm firm = new MarketingFirm(data.manager);

            firm.makeSweepstakes();
        }
Beispiel #22
0
 static void Main(string[] args)
 {
     while (true) // Used to loop back to sweepstakesFactory to select another manager type if needed.
     {
         SweepstakesFactory sweepstakesFactory = new SweepstakesFactory();
         MarketingFirm      newFirm            = new MarketingFirm(sweepstakesFactory.DetermineManager(UserInterface.GetManagerType()));
         newFirm.DetermineMarketFirmAction();
     }
 }
Beispiel #23
0
 static void Main(string[] args)
 {
     while (true)
     {
         SweepstakesFactory sweepstakesFactory = new SweepstakesFactory();
         MarketingFirm      newFirm            = new MarketingFirm(sweepstakesFactory.DetermineManager(UserInterface.GetManagerType()));
         newFirm.DetermineMarketFirmAction();
     }
 }
Beispiel #24
0
        public void CreateMarketingFirmWithManager()
        {
            string marketingFirmName = UserInterface.GetUserInputFor("marketing firm's name.");
            ISweepstakesManager sweepstakesManager = ManagerFactory.GetManager(UserInterface.ChooseManagerPrompt());
            MarketingFirm       marketingFirm      = new MarketingFirm(sweepstakesManager, marketingFirmName);

            marketingFirm.CreateSweepstake();
            //sweepstakesManager.GetSweepstakes();
        }
Beispiel #25
0
        public void CreateMarketingFirmWithManager()
        {
            SweepstakesManagerStore sweepstakesManagerStore = new SweepstakesManagerStore();

            string sweepstakesManagerType = UserInterface.GetSweepstackesManagerType(sweepstakesManagerStore.SweepstakesManagerTypes);

            ISweepstakesManager sweepstakesManager = sweepstakesManagerStore.GetSweepstakesManager(sweepstakesManagerType);

            marketingFirm = new MarketingFirm(sweepstakesManager);
        }
Beispiel #26
0
        static void Main(string[] args)
        {
            ISweepstakesManager manager;

            manager = ChooseManager.PickManager();
            MarketingFirm marketfirm = new MarketingFirm(manager);

            marketfirm.StartSweepstakes("yes");
            Console.ReadLine();
        }
Beispiel #27
0
        static void Main(string[] args)
        {
            Managerfactory newFactory = new Managerfactory();
            MarketingFirm  newFirm    = new MarketingFirm();

            newFirm.SelectManager();
            newFirm.MakeSweepstakes();
            newFirm.DoSweepstakes();
            Console.ReadLine();
        }
Beispiel #28
0
        static void Main(string[] args)
        {
            ISweepstakesManager manager;

            manager = Manager.ManagerSelection();
            MarketingFirm myFirm = new MarketingFirm(manager);

            myFirm.LaunchApp("yes");
            Console.ReadLine();
        }
Beispiel #29
0
        static void Main(string[] args)
        {
            SweepstakesFactory  factory   = new SweepstakesFactory();
            string              userInput = UI.SelectSweepstakesType();
            ISweepstakesManager manager   = factory.SetSweepstakesDataStructure(userInput);

            MarketingFirm marketingFirm = new MarketingFirm(manager);

            marketingFirm.StartProgram();
        }
Beispiel #30
0
        //methods
        public void CreateMarketingFirmWithManager()
        {
            //1. choose a manager
            //2. create a new marketing firm
            //3. have marketing firm create a sweepstake

            _marketingFirm = new MarketingFirm(UserInterface.ChooseAManager(manager));
            _marketingFirm.CreateSweepstake("Maldive Trip");
            _marketingFirm.Update(_name);
        }