//variables //constructor //method public void CreateMarketingFirmWithManager() { ISweepstakesManager stack = new SweepstakesStackManager(); ISweepstakesManager queue = new SweepstakesQueueManager(); MarketingFirm marketingFirm = new MarketingFirm(queue); MarketingFirm marketing = new MarketingFirm(stack); }
public Factory() { stackManager = new SweepstakesStackManager(); queueManager = new SweepstakesQueueManager(); sweepstakes = new Sweepstakes(); firm = new MarketingFirm(); }
public MarketingFirm SelectManagerType() { String Selected_Manager; Console.WriteLine("Welcome.\n"); here: Console.WriteLine("How would you like to manage your data: \n1) {0} \n2) {1}", "STACK data type", "QUEUE data type"); Console.WriteLine(); Selected_Manager = Console.ReadLine(); Console.Clear(); if (Selected_Manager == "1") { marketing = new MarketingFirm(Stack_Type); return(marketing); } if (Selected_Manager == "2") { marketing = new MarketingFirm(Queue_Type); return(marketing); } else { Console.WriteLine("Sorry, invalid entry!"); Console.ReadLine(); Console.Clear(); goto here; } }
static void Main(string[] args) { ISweepStakesManager manager = FactoryDesignPattern.WhichDataStructureIsWanted(); MarketingFirm marketingfirm = new MarketingFirm(manager); Console.ReadLine(); }
public void CreateMarketingFirmWithManager() { bool isAValidInput = false; do { switch (UserInterface.TakeUserInput().ToLower()) { case "1": case "queue": newFirm = new MarketingFirm(queue); isAValidInput = true; break; case "2": case "stack": newFirm = new MarketingFirm(stack); isAValidInput = true; break; default: UserInterface.DisplayMessage("Not a valid input, please choose stack or queue."); break; } }while (isAValidInput == false); }
static void Main(string[] args) { SweepstakesManagerFactory smf = new SweepstakesManagerFactory(); //var manager = smf.WhichManager("queue"); UserInterface.WhichManagerQuestion(); MarketingFirm thing = new MarketingFirm(smf.WhichManager(UserInterface.GetResponse())); Sweepstakes gotmilk = new Sweepstakes("got milk"); Sweepstakes gotmilk1 = new Sweepstakes("got milk1"); Sweepstakes gotmilk2 = new Sweepstakes("got milk2"); Sweepstakes gotmilk3 = new Sweepstakes("got milk3"); Contestant shawn = new Contestant(); Contestant domino = new Contestant(); Contestant ender = new Contestant(); Contestant bre = new Contestant(); thing.manager.InsertSweepstakes(gotmilk); thing.manager.InsertSweepstakes(gotmilk1); thing.manager.InsertSweepstakes(gotmilk2); gotmilk2.RegisterContestant(shawn); thing.manager.InsertSweepstakes(gotmilk3); thing.manager.InsertSweepstakes(gotmilk2); Sweepstakes s = thing.manager.GetSweepstakes(); Console.ReadLine(); }
public void RunSimulation() { ISweepStakeManager manager = WhichManager(); marketingFirm = new MarketingFirm(manager); marketingFirm.CreateSweepStakes(); Console.ReadLine(); }
static void Main(string[] args) { ISweepstakesManager manager = SweepstakesFactory.ChooseYourSweepstakesManagerStyle(); MarketingFirm marketingFirm = new MarketingFirm(manager); marketingFirm.CreateSweepstakes(); marketingFirm.RunSweepstakes(); }
public void CreateMarketingFirmWithManager() { string _manager; ManagerFactory managerFactory = new ManagerFactory(); ISweepStakesManager manager = managerFactory.GetManager("Queue"); int age = 32; MarketingFirm marketingFirm = new MarketingFirm(manager); }
public void CreateMarketingFirmWithManager() { ISweepstakesManager sweepstakesManager; sweepstakesManager = IUserInterface.PickManager(); MarketingFirm marketingFirm = new MarketingFirm(sweepstakesManager); marketingFirm.CreateSweepStakes(); }
static void Main(string[] args) { // instantiate marketing firm ISweepstakesManager sweepstakesManagerQueue = new SweepstakesQueueManager(); ISweepstakesManager sweepstakesManagerStack = new SweepstakesStackManager(); // marketting does functionality upon injection MarketingFirm marketingFirm = new MarketingFirm(UserInterface.StackOrQueuePrompt());; // interchangable with sweepstakesManagerStack depending on the user's choice }
static void Main(string[] args) { string sweepstakesManagerType = UserInterface.DetermineSweepStakesManagerType(); SweepstakesManagerFactory sweepstakesManagerFactory = new SweepstakesManagerFactory(); MarketingFirm marketingFirm = new MarketingFirm(sweepstakesManagerFactory.DetermineSweepstakesManager(sweepstakesManagerType)); marketingFirm.DetermineMarketingFirmAction(); Console.ReadLine(); }
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(); }
public void CreateMarketingFirmWithManager() { string sweepstakesName = Userinterface.GetNewSweepstakesName(); string userInput = Userinterface.ChooseStackOrQueue(); SweepstakesFactory factory = new SweepstakesFactory(); ISweepstakesManager sweepstakesManager = factory.CreateFactory(userInput); MarketingFirm marketingFirm = new MarketingFirm(sweepstakesManager, sweepstakesName); marketingFirm.CreateSweepStakes(); }
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(); }
static void Main(string[] args) { MarketingFirm marketingFirm; SweepstakesQueueManager sweepstakesQueueManager = new SweepstakesQueueManager(); SweepStakesStackManager sweepStakesStackManager = new SweepStakesStackManager(); Contestant firstContestant = new Contestant(); Contestant secondContestant = new Contestant(); Contestant thirdContestant = new Contestant(); SweepStakes sweepStakes1 = new SweepStakes("Bucks"); SweepStakes sweepStakes2 = new SweepStakes("Packers"); sweepStakes1.RegisterContestant(firstContestant); sweepStakes1.RegisterContestant(secondContestant); sweepStakes1.RegisterContestant(thirdContestant); sweepStakes1.PrintContestantInfo(); sweepStakes2.RegisterContestant(firstContestant); sweepStakes2.RegisterContestant(secondContestant); sweepStakes2.PrintContestantInfo(); string input = UserInterfacecs.GetString("Do you want to use queue or stack manager?"); input.ToLower(); switch (input) { case "queue": sweepstakesQueueManager.InsertSweepStakes(sweepStakes1); sweepstakesQueueManager.InsertSweepStakes(sweepStakes2); marketingFirm = new MarketingFirm(sweepstakesQueueManager); break; case "stack": sweepStakesStackManager.InsertSweepStakes(sweepStakes1); sweepStakesStackManager.InsertSweepStakes(sweepStakes2); marketingFirm = new MarketingFirm(sweepStakesStackManager); break; default: break; } }
static void Main(string[] args) { //Contestant alex = new Contestant(); //alex.email = "*****@*****.**"; //alex.isWinner = true; //alex.NotifyContestant(); SweepstakesFactory factory = new SweepstakesFactory(); string style = UI.GetManagerStyle(); ISweepstakesManager manager = factory.CreateSweepstakesManager(style); MarketingFirm firm = new MarketingFirm(manager); firm.Menu(); }
void CreateMarketingFirmWithManager() { ISweepStakesManaager manager; switch (UserInterface.GetUserInput("Choose Your Manager: Stack or Queue.").ToLower()) { case "stack": manager = new SweepStakesStackManager(); MarketingFirm Mf = new MarketingFirm(manager); break; case "queue": manager = new SweepStakesQueueManager(); Mf = new MarketingFirm(manager); break; default: CreateMarketingFirmWithManager(); break; } }
public void CreateMarketingFirmWithManager() { bool firmIsDeciding = true; do { switch (UserInterface.TakeUserInput().ToLower()) { case "1": case "queue": newFirm = new MarketingFirm(queue, random); firmIsDeciding = false; break; case "2": case "stack": newFirm = new MarketingFirm(stack, random); firmIsDeciding = false; break; } }while (firmIsDeciding == true); }
static void Main(string[] args) { Console.WriteLine("would you like to use a stack or queue to store your sweepstakes?"); string userInput = Console.ReadLine(); ISweepstakesManager sweepStakesManager; switch (userInput) { case "queue": sweepStakesManager = new SweepstakesQueueManager(); MarketingFirm MFQ = new MarketingFirm(sweepStakesManager); break; case "stack": sweepStakesManager = new SweepstakesStackManager(); MarketingFirm MFS = new MarketingFirm(sweepStakesManager); break; default: break; } }
public void CreateMarketingFirm() { int input; Console.WriteLine("Press 1 for Stack management type. "); Console.WriteLine("Press 2 for Queue management style. "); input = int.Parse(Console.ReadLine()); ISweepStakesManager manager = null; if (input == 1) { manager = new SweepStakesStackManager(); } else if (input == 2) { manager = new SweepStakesQueueManager(); } else { Console.WriteLine("Please enter a valid input. "); CreateMarketingFirm(); } MarketingFirm marketingFirm = new MarketingFirm(manager); }
public void CreateMarketingFirmWithManager() { var queueOrStack = UserInterface.QueueOrStack(); MarketingFirm marketingFirm = new MarketingFirm(queueOrStack); }
static void Main(string[] args) { MarketingFirm theRightChoice = new MarketingFirm(); }
static void Main(string[] args) { MarketingFirm thing = new MarketingFirm(); }
//member variables //constructor //member methods public void CreateMarketingFirmWithManager() { ISweepStakesManager sweepStakesManager = UserInterface.GetChoiceOfManager(); MarketingFirm marketingFirm = new MarketingFirm(sweepStakesManager); }
static void Main(string[] args) { MarketingFirm marketingFirm = new MarketingFirm(); marketingFirm.ChooseQueueOrStack(); }
public void RunSim() { ISweepstakesManager sweepstakesChoice = ManagerFactory.Factory(GetInput()); MarketingFirm marketingFirm = new MarketingFirm(sweepstakesChoice); }
public static void Main(string[] args) { ISweepstakesManager manager = UserInterface.GetManager(); MarketingFirm marketingFirm = new MarketingFirm(manager); }