markovood

Untitled

Mar 25th, 2020
205
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. namespace PizzaCalories
  2. {
  3.     public abstract class Ingredient
  4.     {
  5.         protected const double BASE_CALORIES_PER_GRAM = 2.0;
  6.                
  7.         public abstract double WeightGR { get; protected set; }
  8.  
  9.         public double CaloriesPerGR
  10.         {
  11.             get => BASE_CALORIES_PER_GRAM * this.Modifier;
  12.         }
  13.  
  14.         protected double Modifier { get; set; }
  15.     }
  16. }
RAW Paste Data