else if (src == referenca.buttonPlus)//when someone press button +
{
num=referenca.getDisplay();//gets the number that someone typed and saves it into variable num
numStringToDouble = Double.parseDouble(num);//Converts String to Double
matOperacija="+"; //saves mathematical operations - I have set this variable to be INT but I am not sure what should it be INT,CHAR,STRING...
referenca.setDisplay ("",""); //sets blank display
}
//here should be buttonMinus, buttonMultpy etc...all the same as buttonPlus
else if (src == referenca.buttonEqual)
{
String equal= referenca.getDisplay(); //gets displayed number
Double newEqual =Double.parseDouble(equal); //converts displayed number into double
Double result = //here is where I should use a mathematical operation but I do not know how.
String newResult = Double.toString(result); // converts Double into String
referenca.setDisplay(newResult); //sets display to a new result
}