软件大小: | 3 K | ||
上传用户: | guoliushuan | ||
关键词: | myassembler 大学 | ||
下载地址: | 免注册下载 普通下载 |
相关代码 |
|
public class Add extends Expression { private Expression firstOp, secondOp; public Add(Expression f, Expression s) { firstOp = (Expression)f.clone(); secondOp = (Expression)s.clone(); } public int eval() { return firstOp.eval()+secondOp.eval(); } public Object clone() { return new Add(firstOp, secondOp); } public String toString() { return firstOp.toString()+secondOp.toString()+labelling()+"ADD\n"; } }
相关资源 |
|