Example #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);
        }
Example #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));
        }