public double calculate(double a, double b)
    {
        switch (value)
        {
            case '+': return a+b;
            case '-': return a-b;
            case '*': return a*b;
            case '/': return a/b;
            case '^': return Math.pow(a, b);
        }
        return 0;
    }