四则运算 测试与封装 (完善) 5.2 5.3
2015-05-07 17:34
375 查看
一、结对小伙伴:陈淑筠 http://www.cnblogs.com/babybluecsj/
二、(1)我用小伙伴上一次5.1的作业来单元测试,发现当除数为零时,运行时未抛出异常,于是我们加上了
(3).在此,我们还增加了答案精确到了小数后一位:
(4).由于时间原因,在代码中增加了:
二、(1)我用小伙伴上一次5.1的作业来单元测试,发现当除数为零时,运行时未抛出异常,于是我们加上了
1. if
(fh2==
'/'
){
(3).在此,我们还增加了答案精确到了小数后一位:
static
double
answer=
0
.0d;
public
static
double
Onefhnum(
int
a,
int
b,
int
e)
throws
Exception{
//一个运算符的方法
public
static
double
Twofhnum(
int
a,
int
b,
int
c,
int
e,
int
h)
throws
Exception{
//两个运算符的方法
public
static
double
Threefhnum(
int
a,
int
b,
int
c,
int
d,
int
e,
int
h,
int
f)
throws
Exception{
//三个运算符的方法
(4).由于时间原因,在代码中增加了:
int
precision =
0
;
相关文章推荐
- 作业5 四则运算 测试与封装 (完善) 5.2 5.3
- 四则运算测试与封装5.2 5.3 结对
- 四则运算测试与封装5.2 5.3 结对
- 作业5 四则运算 测试与封装 5.1 5.2
- 作业5 四则运算 测试与封装 5.1 5.2
- 【作业报告】作业5 四则运算 测试与封装 5.2(已更新)
- 作业5 四则运算 测试与封装 5.2
- 作业5 四则运算 测试与封装 5.2
- 20150421 作业5 四则运算 测试与封装 5.1 5.2(doing)
- 作业5 四则运算 测试与封装 5.1 5.2
- 作业5 四则运算 测试与封装 5.2
- 20150421 作业5 四则运算 测试与封装 5.1 5.2
- 作业5 四则运算 测试与封装 5.2
- 20150421 作业5 四则运算 测试与封装 5.1
- 【作业报告】作业5 四则运算 测试与封装 5.1 改进版
- 作业5 四则运算 测试与封装 5.1
- 四则运算5.2-5.3
- 作业5 四则运算 测试与封装 5.1
- 随机四则运算5.2~5.3
- 测试与封装5.2-5.3