コード例 #1
0
        /// <summary>
        /// Static class that creates a default object for each entree, side, and drink and returns a list of them
        /// </summary>
        /// <returns>The list of default entrees, sides, and drinks</returns>
        public static IEnumerable <IOrderItem> CompleteMenu()
        {
            List <IOrderItem> completemenu = new List <IOrderItem>();
            //Entrees copy and paste, couldn't get "Concat" to work so this is brute force implemented
            AngryChicken chicken = new AngryChicken();

            completemenu.Add(chicken);
            CowpokeChili chili = new CowpokeChili();

            completemenu.Add(chili);
            TrailBurger trailburger = new TrailBurger();

            completemenu.Add(trailburger);
            RustlersRibs ribs = new RustlersRibs();

            completemenu.Add(ribs);
            PecosPulledPork pulledpork = new PecosPulledPork();

            completemenu.Add(pulledpork);
            DakotaDoubleBurger dakotaburger = new DakotaDoubleBurger();

            completemenu.Add(dakotaburger);
            TexasTripleBurger texasburger = new TexasTripleBurger();

            completemenu.Add(texasburger);
            //Sides copy and paste
            BakedBeans smallbeans = new BakedBeans();

            completemenu.Add(smallbeans);
            BakedBeans mediumbeans = new BakedBeans();

            mediumbeans.Size = Size.Medium;
            completemenu.Add(mediumbeans);
            BakedBeans largebeans = new BakedBeans();

            largebeans.Size = Size.Large;
            completemenu.Add(largebeans);
            ChiliCheeseFries smallchilicheesefries = new ChiliCheeseFries();

            completemenu.Add(smallchilicheesefries);
            ChiliCheeseFries mediumchilicheesefries = new ChiliCheeseFries();

            mediumchilicheesefries.Size = Size.Medium;
            completemenu.Add(mediumchilicheesefries);
            ChiliCheeseFries largechilicheesefries = new ChiliCheeseFries();

            largechilicheesefries.Size = Size.Large;
            completemenu.Add(largechilicheesefries);
            CornDodgers smalldodgers = new CornDodgers();

            completemenu.Add(smalldodgers);
            CornDodgers mediumdodgers = new CornDodgers();

            mediumdodgers.Size = Size.Medium;
            completemenu.Add(mediumdodgers);
            CornDodgers largedodgers = new CornDodgers();

            largedodgers.Size = Size.Large;
            completemenu.Add(largedodgers);
            PanDeCampo smallcampo = new PanDeCampo();

            completemenu.Add(smallcampo);
            PanDeCampo mediumcampo = new PanDeCampo();

            mediumcampo.Size = Size.Medium;
            completemenu.Add(mediumcampo);
            PanDeCampo largecampo = new PanDeCampo();

            largecampo.Size = Size.Large;
            completemenu.Add(largecampo);
            //Drinks copy and paste
            JerkedSoda smallsoda = new JerkedSoda();

            completemenu.Add(smallsoda);
            JerkedSoda mediumsoda = new JerkedSoda();

            mediumsoda.Size = Size.Medium;
            completemenu.Add(mediumsoda);
            JerkedSoda largesoda = new JerkedSoda();

            largesoda.Size = Size.Large;
            completemenu.Add(largesoda);
            TexasTea smalltea = new TexasTea();

            completemenu.Add(smalltea);
            TexasTea mediumtea = new TexasTea();

            mediumtea.Size = Size.Medium;
            completemenu.Add(mediumtea);
            TexasTea largetea = new TexasTea();

            largetea.Size = Size.Large;
            completemenu.Add(largetea);
            CowboyCoffee smallcoffee = new CowboyCoffee();

            completemenu.Add(smallcoffee);
            CowboyCoffee mediumcoffee = new CowboyCoffee();

            mediumcoffee.Size = Size.Medium;
            completemenu.Add(mediumcoffee);
            CowboyCoffee largecoffee = new CowboyCoffee();

            largecoffee.Size = Size.Large;
            completemenu.Add(largecoffee);
            Water smallwater = new Water();

            completemenu.Add(smallwater);
            Water mediumwater = new Water();

            mediumwater.Size = Size.Medium;
            completemenu.Add(mediumwater);
            Water largewater = new Water();

            largewater.Size = Size.Large;
            completemenu.Add(largewater);

            return(completemenu);
        }