GfG QA is closing soon... Please refer PRACTICE or GfG now on wards !!

Design a calculator

design and implement a calculator that can calculate expressions like: 
+ 2 4 
* 8 ( + 7 12) 
( + 7 ( * 8 12 ) ( * 2 (+ 9 4) 7 ) 3 ) 

(PS:all items are space delimetered.) 

Example answers 
+ 2 4 => 2 + 4 = 6 
* 8 ( + 7 12) => 8 * ( 7 + 12 ) = 152 
( + 7 ( * 8 12 ) ( * 2 (+ 9 4) 7 ) 3 ) => 7+8*12+2*(9+4)*7+3 = 148

asked Nov 20, 2015 by Swanky
...