예제 #1
0
 public void GetInfo()//contestant enter there info
 {
     FirstName    = UserInterfacecs.GetString("Enter your first name.");
     LastName     = UserInterfacecs.GetString("Enter your last name.");
     EmailAddress = UserInterfacecs.GetString("Enter your email address.");
     Console.ReadLine();
     Console.Clear();
 }
예제 #2
0
        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;
            }
        }