예제 #1
0
 /// <summary>
 /// Constructs a new combo with the specified entree.
 /// </summary>
 /// <param name="entree">The entree to use.</param>
 public CretaceousCombo(Entree entree)
 {
     entree.PropertyChanged += ComboItemPropertyChanged;
     Entree = entree;
     Side   = new Fryceritops();
     Drink  = new Sodasaurus();
     Toy    = "Dinosaur Toy";
 }
예제 #2
0
 /// <summary>
 /// Makes combo with entree
 /// </summary>
 /// <param name="entree">The entree</param>
 public CretaceousCombo(Entree entree)
 {
     Entree = entree;
     Side   = new Fryceritops();
     Drink  = new Water();
     Toy    = "Dino";
     Size   = Size.Medium;
 }
예제 #3
0
        /// <summary>
        /// init with entree
        /// </summary>
        /// <param name="entree"></param>
        public CretaceousCombo(Entree entree)
        {
            entree.PropertyChanged += OnItemPropertyChanged;
            this.Entree             = entree;


            Side  = new Fryceritops();
            Drink = new Sodasaurus();
        }
예제 #4
0
 /// <summary>
 /// constructs a combo
 /// </summary>
 /// <param name="entree">the type of combo</param>
 public CretaceousCombo(Entree entree)
 {
     Entrees = entree;
     Sides   = new Fryceritops();
     Drinks  = new Sodasaurus();
     PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Special"));
     PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Size"));
     PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Description"));
     PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Price"));
 }
예제 #5
0
        public void TotalCostShouldBeCorrect()
        {
            Order      order = new Order();
            Sodasaurus soda  = new Sodasaurus();

            order.Add(soda);
            TRexKingBurger trex = new TRexKingBurger();

            order.Add(trex);
            Fryceritops fry = new Fryceritops();

            order.Add(fry);
            Assert.Equal(12.034, order.TotalCost);
        }
예제 #6
0
        public void SalesTaxShouldBeCorrect()
        {
            Order      order = new Order();
            Sodasaurus soda  = new Sodasaurus();

            order.Add(soda);
            TRexKingBurger trex = new TRexKingBurger();

            order.Add(trex);
            Fryceritops fry = new Fryceritops();

            order.Add(fry);
            Assert.Equal(1.094, order.SalesTaxCost);
        }
예제 #7
0
        /// <summary>
        /// Menu sets up instances of all iteam to put in AvailableMenuItems
        /// </summary>
        public Menu()
        {
            Brontowurst b = new Brontowurst();

            AvailableMenuItems.Add(b.ToString());
            DinoNuggets d = new DinoNuggets();

            AvailableMenuItems.Add(d.ToString());
            PrehistoricPBJ pr = new PrehistoricPBJ();

            AvailableMenuItems.Add(pr.ToString());
            PterodactylWings pt = new PterodactylWings();

            AvailableMenuItems.Add(pt.ToString());
            SteakosaurusBurger st = new SteakosaurusBurger();

            AvailableMenuItems.Add(st.ToString());
            TRexKingBurger tr = new TRexKingBurger();

            AvailableMenuItems.Add(tr.ToString());
            VelociWrap ve = new VelociWrap();

            AvailableMenuItems.Add(ve.ToString());
            Fryceritops fr = new Fryceritops();

            AvailableMenuItems.Add(fr.ToString());
            Triceritots tri = new Triceritots();

            AvailableMenuItems.Add(tri.ToString());
            MeteorMacAndCheese mc = new MeteorMacAndCheese();

            AvailableMenuItems.Add(mc.ToString());
            MezzorellaSticks me = new MezzorellaSticks();

            AvailableMenuItems.Add(me.ToString());
            Tyrannotea ty = new Tyrannotea();

            AvailableMenuItems.Add(ty.ToString());
            Sodasaurus so = new Sodasaurus();

            AvailableMenuItems.Add(so.ToString());
            JurassicJava jr = new JurassicJava();

            AvailableMenuItems.Add(jr.ToString());
            Water wa = new Water();

            AvailableMenuItems.Add(wa.ToString());
            Ingredients = AvailableMenuItems;
        }
예제 #8
0
        public void SubtotalCannotGoNegative()
        {
            Order      order = new Order();
            Sodasaurus soda  = new Sodasaurus();

            order.Add(soda);
            TRexKingBurger trex = new TRexKingBurger();

            order.Add(trex);
            Fryceritops fry = new Fryceritops();

            order.Add(fry);
            soda.Price = -100;
            Assert.Equal(order.SubtotalCost, -1);
        }
예제 #9
0
 /// <summary>
 /// Constructor for the creation of a combo
 /// </summary>
 /// <param name="entree"> the kind of entree </param>
 public CretaceousCombo(Entree entree)
 {
     Entree = entree;
     Side   = new Fryceritops();
     Drink  = new Sodasaurus();
 }
예제 #10
0
        /// <summary>
        /// This method returns a list of all menu items
        /// </summary>
        /// <returns>This string is a list of all the menu items</returns>
        public override String ToString()
        {
            StringBuilder sb = new StringBuilder();
            JurassicJava  j  = new JurassicJava();

            sb.Append(j.ToString() + "\n");
            Sodasaurus s = new Sodasaurus();

            sb.Append(s.ToString() + "\n");
            Tyrannotea t = new Tyrannotea();

            sb.Append(t.ToString() + "\n");
            Water w = new Water();

            sb.Append(w.ToString() + "\n");
            Brontowurst b = new Brontowurst();

            sb.Append(b.ToString() + "\n");
            DinoNuggets d = new DinoNuggets();

            sb.Append(d.ToString() + "\n");
            PrehistoricPBJ p = new PrehistoricPBJ();

            sb.Append(p.ToString() + "\n");
            PterodactylWings pt = new PterodactylWings();

            sb.Append(pt.ToString() + "\n");
            SteakosaurusBurger st = new SteakosaurusBurger();

            sb.Append(st.ToString() + "\n");
            TRexKingBurger tk = new TRexKingBurger();

            sb.Append(tk.ToString() + "\n");
            VelociWrap v = new VelociWrap();

            sb.Append(v.ToString() + "\n");
            Fryceritops f = new Fryceritops();

            sb.Append(f.ToString() + "\n");
            MeteorMacAndCheese m = new MeteorMacAndCheese();

            sb.Append(m.ToString() + "\n");
            MezzorellaSticks mz = new MezzorellaSticks();

            sb.Append(mz.ToString() + "\n");
            Triceritots tr = new Triceritots();

            sb.Append(tr.ToString() + "\n");
            CretaceousCombo cc1 = new CretaceousCombo(new Brontowurst());

            sb.Append(cc1.ToString() + "\n");
            CretaceousCombo cc2 = new CretaceousCombo(new DinoNuggets());

            sb.Append(cc2.ToString() + "\n");
            CretaceousCombo cc3 = new CretaceousCombo(new PrehistoricPBJ());

            sb.Append(cc3.ToString() + "\n");
            CretaceousCombo cc4 = new CretaceousCombo(new PterodactylWings());

            sb.Append(cc4.ToString() + "\n");
            CretaceousCombo cc5 = new CretaceousCombo(new SteakosaurusBurger());

            sb.Append(cc5.ToString() + "\n");
            CretaceousCombo cc6 = new CretaceousCombo(new TRexKingBurger());

            sb.Append(cc6.ToString() + "\n");
            CretaceousCombo cc7 = new CretaceousCombo(new VelociWrap());

            sb.Append(cc7.ToString() + "\n");
            return(sb.ToString());
        }
예제 #11
0
 /// <summary>
 /// The combo put together
 /// </summary>
 /// <param name="entree"></param>
 public CretaceousCombo(Entree entree)
 {
     Entree = entree;
     Side   = new Fryceritops();
     Drink  = new Tyrannotea();
 }
예제 #12
0
 public cretaceousecombo(Entree e)
 {
     this.Entree = e;
     side        = new Fryceritops();
     drink       = new Sodasaurus();
 }