//因为很简单,所以不采用MVC模式
//先写个JavaBean包
package cn.itcast.bean;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;
public class CaculatorBean {
//定义第一个数字
private String firstNum;
//定义第二个数字
private String secNum;
//定义运算符
private char operator;
//定义报错处理方法
private Map<String,String> errors = new HashMap<String,String>();
//实现所有的GETTER和SETTER
public Map<String, String> getErrors() {
return errors;
}
public void setErrors(Map<String, String> errors) {
this.errors = errors;
}
public String getFirstNum() {
return firstNum;
}
public void setFirstNum(String firstNum) {
this.firstNum = firstNum;
}
public String getSecNum() {
return secNum;
}
public void setSecNum(String secNum) {
this.secNum = secNum;
}
public char getOperator() {
return operator;
}
public void setOperator(char operator) {