public IceCream(Int32 delivery, bool extraFood, bool taste) : base(delivery, extraFood) { switch (taste) { case true: this.Cost += 10; this.Taste = TTaste.vanilla; break; case false: this.Cost += 20; this.Taste = TTaste.chokolate; break; default: this.Cost += 10; this.Taste = TTaste.vanilla; break; } }
public IceCream(Int32 delivery, bool extraFood, bool taste) : base(delivery, extraFood) { Name = "IceCream"; Image = "D:/С#/OOP_Lab_2/OOP_Lab_2/Resourses/IceCream.jpg"; switch (taste) { case true: this.Cost += 10; this.Taste = TTaste.vanilla; break; case false: this.Cost += 20; this.Taste = TTaste.chokolate; break; default: this.Cost += 10; this.Taste = TTaste.vanilla; break; } }