/// <summary> /// Division counting /// </summary> /// <returns>Result of division</returns> public override double Counting() { double value1 = LeftChild.Counting(); double value2 = RightChild.Counting(); if (value2 == 0) { throw new DivideByZeroException(); } return(value1 / value2); }
/// <summary> /// Subtraction's counting /// </summary> /// <returns>Subtraction's result</returns> public override double Counting() => LeftChild.Counting() - RightChild.Counting();