public Snack(SnacksType snacksType) { switch (snacksType) { case SnacksType.Chips: { this.Name = "Chips "; this.Price = 2; } break; case SnacksType.Snickers: { this.Name = "Snickers "; this.Price = 1; } break; case SnacksType.Bounty: { this.Name = "Bounty "; this.Price = 3; } break; case SnacksType.Kexchoklad: { this.Name = "Kexchoklad"; this.Price = 5; } break; case SnacksType.Bilar: { this.Name = "Bilar "; this.Price = 2; } break; } }
public void AddSnackToTempCart(SnacksType snacks) { TemporaryCart.Add(new Snack(snacks)); }
public void BuySnacks(SnacksType snacks) { ShoppingCart.Add(new Snack(snacks)); }