新人求助帖C#面对对象问题

  1. Please write a read-only property called TotalEnergy that adds together and returns the combined energy values of all the pizza's ingredients.
  2. Please write a Boolean method called IsVegetarian that returns true or false depending on whether or not the pizza is vegetarian. A pizza is vegetarian if all its ingredients are vegetarian.
  3. Please write an implementation of the method CompareTo so pizzas are ordered by retail price. Cheaper pizzas should appear before more expensive pizzas in the order.不是很懂这三个怎么做求解

题目已经告诉你说明了,  TotalEnergy 是只读的属性, 等等。 

请你尽力写出你能做到的最好程度,再描述你碰到的问题。