Exemplo n.º 1
0
        public string Calculate(string operandA, string operandB, IOperator operatorForAAndB)
        {
            var A = ConvertFromRomanToArabNumber(operandA);
            var B = ConvertFromRomanToArabNumber(operandB);

            var answerForExpression = operatorForAAndB.CalculateIt(A, B);

            return ConvertFromArabToRomanNumber(answerForExpression);
        }
Exemplo n.º 2
0
        public string Calculate(string operandA, string operandB, IOperator operatorForAAndB)
        {
            var A = ConvertFromRomanToArabNumber(operandA);
            var B = ConvertFromRomanToArabNumber(operandB);

            var answerForExpression = operatorForAAndB.CalculateIt(A, B);

            return(ConvertFromArabToRomanNumber(answerForExpression));
        }