import view.CalculatorView;
/** * @param args the command line arguments */ public static void main(String[] args) { new CalculatorView().setVisible(true); }
package model;
switch (operator){ case 1: result = operand1 + operand2; break; case 2: result = operand1 - operand2; break; case 3: result = operand1 * operand2; break; case 4: result = operand1 / operand2; break; case 5: result = operand1 % operand2; break; case 6: result = 1/operand1; break; } operand1=result; }