public Pizza(int id, PizzaName name, string description, int price) { Id = id; PizzaName = name; Description = description; Price = price; }
/// <summary> /// <remarks> /// The arg-constructor initializes fields: name, hunger, sharpness, flavor, shape, smell. /// The constructor computes number of points for specified Pizza. /// </remarks> /// </summary> /// <param Name="name"></param> /// <param Name="Hunger"></param> /// <param Name="Sharpness"></param> /// <param Name="Flavor"></param> /// <param Name="Shape"></param> /// <param Name="Smell"></param> public Pizza(PizzaName name, int hunger, int sharpness, int flavor, PizzaShape shape, int smell) { this.Name = name; this.Hunger = hunger; this.Sharpness = sharpness; this.Flavor = flavor; this.Shape = shape; this.Smell = smell; this.Score = Math.Round(hunger * 0.87 + sharpness * 0.92 + flavor * 0.23 + ComputeShapeScore(shape) + smell * 0.43, 2); }