/**
* @Copyright(C) 2008 Software Engineering Laboratory (SELAB), Department of Computer
* Science, SUN YAT-SEN UNIVERSITY. All rights reserved.
**/
package parser;
import exceptions.*;
/**
* Main program of the expression based calculator ExprEval
*
* @author [PENDING your name]
* @version 1.00 (Last update: [PENDING the last update])
**/
public class Calculator
{
/**
* The main program of the parser. You should substitute the body of this method
* with your experiment result.
*
* @param expression user input to the calculator from GUI.
* @return if the expression is well-formed, return the evaluation result of it.
* @throws ExpressionException if the expression has error, a corresponding
* exception will be raised.
**/
public double calculate(String expression) throws ExpressionException
{
// You should substitute this method body ...
double result = ((int) (Math.random() * 1000000000)) / 100.0;
return result;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
ExprEval.rar_ExprEval
共97个文件
html:55个
class:28个
bat:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 134 浏览量
2022-09-22
18:34:07
上传
评论
收藏 121KB RAR 举报
温馨提示
编译原理,实现科学计数器,支持加减乘除,布尔常量,科学计数法等
资源推荐
资源详情
资源评论
收起资源包目录
ExprEval.rar (97个子文件)
实验软装置(基于表达式的计算器ExprEval)
bin
ExprEval.class 317B
test
ExprEvalTest.class 8KB
TestCase.class 1KB
exceptions
IllegalIdentifierException.class 365B
DividedByZeroException.class 343B
ExpressionException.class 345B
MissingOperandException.class 356B
LexicalException.class 334B
MissingLeftParenthesisException.class 382B
FunctionCallException.class 362B
TrinaryOperationException.class 374B
MissingOperatorException.class 359B
MissingRightParenthesisException.class 385B
IllegalSymbolException.class 347B
TypeMismatchedException.class 348B
IllegalDecimalException.class 358B
SemanticException.class 337B
EmptyExpressionException.class 359B
SyntacticException.class 340B
gui
MainWindow$7.class 723B
MainWindow$6.class 664B
MainWindow$2.class 1013B
MainWindow.class 5KB
MainWindow$5.class 696B
MainWindow$1.class 628B
MainWindow$3.class 671B
MainWindow$8.class 507B
MainWindow$4.class 635B
test_standard.bat 173B
ref
package-list 25B
deprecated-list.html 5KB
package-frame.html 794B
help-doc.html 8KB
allclasses-frame.html 3KB
test
package-summary.html 5KB
ExprEvalTest.html 15KB
package-frame.html 915B
package-tree.html 5KB
TestCase.html 16KB
exceptions
ExpressionException.html 11KB
package-summary.html 9KB
SemanticException.html 11KB
TypeMismatchedException.html 11KB
MissingOperandException.html 11KB
EmptyExpressionException.html 11KB
package-frame.html 3KB
MissingOperatorException.html 11KB
IllegalIdentifierException.html 11KB
SyntacticException.html 12KB
FunctionCallException.html 11KB
package-tree.html 8KB
IllegalDecimalException.html 11KB
MissingLeftParenthesisException.html 11KB
DividedByZeroException.html 11KB
LexicalException.html 11KB
MissingRightParenthesisException.html 11KB
TrinaryOperationException.html 11KB
IllegalSymbolException.html 11KB
overview-summary.html 5KB
index.html 922B
allclasses-noframe.html 3KB
resources
inherit.gif 57B
serialized-form.html 15KB
overview-frame.html 1KB
stylesheet.css 1KB
constant-values.html 6KB
index-all.html 26KB
packages.html 696B
gui
package-summary.html 5KB
MainWindow.html 26KB
package-frame.html 820B
package-tree.html 6KB
overview-tree.html 8KB
ExprEval.html 9KB
src
parser
Calculator.java 1KB
testcases
simple.xml 2KB
standard.xml 3KB
build.bat 92B
test_simple.bat 91B
doc
package-list 8B
deprecated-list.html 4KB
help-doc.html 8KB
allclasses-frame.html 685B
index.html 814B
allclasses-noframe.html 665B
resources
inherit.gif 57B
stylesheet.css 1KB
constant-values.html 4KB
index-all.html 5KB
packages.html 702B
overview-tree.html 5KB
parser
package-summary.html 5KB
package-frame.html 835B
package-tree.html 5KB
Calculator.html 9KB
run.bat 51B
doc.bat 120B
共 97 条
- 1
资源评论
我虽横行却不霸道
- 粉丝: 75
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功