First get the whole string and try to use a stack to store the numbers and operators. Then try to use postfix notation to calculate the expression.