Esempio n. 1
0
        public void RunSweepstakes()
        {
            //HASA userinterface tHerefOre
            UserInterface newUI = new UserInterface();

            newUI.EnterOrEnd();
            if (newUI.response == "Y" || newUI.response == "yes" || newUI.response == "YES" || newUI.response == "yes" || newUI.response == "y")
            {
                while (enter == true)
                {
                    newUI.GetFirstName();
                    newUI.GetLastName();
                    newUI.GetEmailAddress();
                    newUI.AssignRegistrationNumber();
                    newUI.NewContestant(newUI.fNameInput, newUI.lNameInput, newUI.emailInput, newUI.regNumber);
                    RegisterContestant(newUI.newContestant);
                    Enter();
                }
                if (enter == false)
                {
                    newUI.EndSweepstakes();
                    EndSweepstakes(newUI);
                }
            }
            else
            {
                newUI.EndSweepstakes();
                EndSweepstakes(newUI);
            }
        }
Esempio n. 2
0
 public void RegisterContestant(Contestant contestant)
 {
     contestant.FirstName          = UserInterface.GetUserInputFor("Please enter your first name!");
     contestant.LastName           = UserInterface.GetUserInputFor("Please enter your last name!");
     contestant.EmailAddress       = UserInterface.GetUserInputFor("Please enter your email address!");
     contestant.RegistrationNumber = UserInterface.AssignRegistrationNumber();
     contestants.Add(_mostRecentKey, contestant);
     _mostRecentKey++;
 }
Esempio n. 3
0
        public Contestant()
        {
            Contestant contestant = new Contestant();

            FirstName          = UserInterface.AssignFirstName();
            LastName           = UserInterface.AssignLastName();
            EmailAddress       = UserInterface.AssignEmailAddress();
            RegistrationNumber = UserInterface.AssignRegistrationNumber();
        }