public synchronized double compute() {
		if ((getChild1() != null) && (getChild2() != null)) {
			double val1 = getChild1().compute();
			double val2 = getChild2().compute();
		
			if (getOperator().equals(ADD)) {
				setValue(val1 + val2);
			} else if (getOperator().equals(SUBTRACT)) {
				setValue(val1 - val2);
			} else if (getOperator().equals(MULTIPLY)) {
				setValue(val1 * val2);
			} else if (getOperator().equals(DIVIDE)) {
				setValue(val1 / val2);
			}
		}
		
		return getValue();
	}