*
* @param event event sent by the GUI.
*/
void handle(final ApplicationEvent event)
{
CalculateExpressionEvent calculateExprEvent = (CalculateExpressionEvent) event;
try
{
Result result = model.parseExpression(calculateExprEvent.getExpression());
view.updateResultField(result.toString().concat("=").concat(calculateExprEvent.getExpression()));
System.out.println(result.toString());
}
catch(IllegalInputStringException illegalInputException)
{
view.updateResultField("Illegal characters found.");