Ejemplo n.º 1
0
        public void CreateSweepstakes()
        {
            string      name        = Userinterface.GetUserInputFor("name sweepstakes");
            Sweepstakes sweepstakes = new Sweepstakes(name);

            _manager.InsertSweepstakes(sweepstakes);
        }
Ejemplo n.º 2
0
        public void GetUserInfoAndRegister()
        {
            string     firstName          = Userinterface.GetFirstName();
            string     lastName           = Userinterface.GetLastName();
            string     email              = Userinterface.GetUserEmail();
            int        registrationNumber = Userinterface.GetRegistrationNumber();
            Contestant contestant         = new Contestant(firstName, lastName, email, registrationNumber);

            sweepstakes.RegisterContestant(contestant);
        }
Ejemplo n.º 3
0
        public Contestant CreateContestant()
        {
            string firstName    = Userinterface.GetFirstName();
            string lastName     = Userinterface.GetLastName();
            string emailAddress = Userinterface.GetEmailAddress();

            contestantCount++;

            Contestant contestant = new Contestant(firstName, lastName, emailAddress, contestantCount);

            return(contestant);
        }
Ejemplo n.º 4
0
        public void CreateSweepstakes()
        {
            string collection = Userinterface.ChooseCollection();

            if (collection == "S" || collection == "s")
            {
                _manager = new SweepstakesStackManager();
            }
            else if (collection == "Q" || collection == "q")
            {
                _manager = new SweepstakesQueueManager();
            }
        }
Ejemplo n.º 5
0
        public void CreateMarketingFirmWithManager()
        {
            int choice = Int32.Parse(Userinterface.GetUserInputFor("Enter 1 for stack manager, enter 2 for queue manager."));
            ISweepstakesManager manager;

            if (choice == 1)
            {
                manager = new SweepstakesStackManager();
            }
            else
            {
                manager = new SweepstakesQueueManager();
            }

            MarketingFirm marketingFirm = new MarketingFirm(manager);
        }
 public Contestant()
 {
     firstName    = Userinterface.GetUserInputFor("Get contestant first name.");
     lastName     = Userinterface.GetUserInputFor("Get contestant last name.");
     emailAddress = Userinterface.GetUserInputFor("Get contestant email address.");
 }