nl: gettotal : updated from project 1 @ 5 dec 2010 returns total on top of operands stack . throws exception that indicates that the input formula was not correct . concode_field_sep Stack<Double> operands concode_elem_sep Stack<OperationsInterface> operators concode_field_sep void addOperator concode_elem_sep int size concode_elem_sep void debugPrintStacks concode_elem_sep void clear concode_elem_sep void addGrouping concode_elem_sep void calculate concode_elem_sep void addOperand
code: double function ( ) { if ( operands . size ( ) == 1 && operators . isEmpty ( ) ) return operands . pop ( ) ; if ( operators . size ( ) == 1 ) { if ( operands . size ( ) == 2 ) { return ( ( Operator ) operators . pop ( ) ) . compute ( operands . pop ( ) , operands . pop ( ) ) ; } } throw new ExpressionException ( "srini_string" ) ; }