Well, what you could do is create four functions for each mathematical operator (multiplication, addition, subtraction, division) which takes in two integers (or doubles, floats, whatever you need to calculate).
The user will enter the first number and click on a mathematical operator. When that operator is clicked you will know which function to use. The user will enter the second number and click on either another operator or the equals button. At this point you will pass the two numbers to the pertinent function and return the result to the user.
Easy as pi.
PS: This is a very common homework question, so don't expect anybody to give you any code.