private PerformanceCalculator CreatePerformanceCalculatorData(Performance aPerformance, PlayDetails aPlay) { switch (aPlay.Type) { case "tragedy": return(new TragedyCalculator(aPerformance, aPlay)); case "comedy": return(new ComedyCalculator(aPerformance, aPlay)); default: throw new Exception($"unknown type: { aPlay.Type }"); } }
public ComedyCalculator(Performance aPerformance, PlayDetails aPlay) : base(aPerformance, aPlay) { }
public PerformanceCalculator(Performance aPerformance, PlayDetails aPlay) { Performance = aPerformance; Play = aPlay; }