摘要: 一、题目要求 使用下面方法printPrimes()完成后面的问题(a)-(d): 代码如下: (a)画出流程控制图 (b)将MAXPRIMES设为4,这样t2=(n=5)就会出现数组越界的错误,但t1=(n=3)无影响。 (c)n=0判断时会不满足numPrimes < n的循环条件,因此不会进入 阅读全文
posted @ 2016-03-30 16:04 lsy2012 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 本次实验目的是为了: (1)熟悉软件测试工具Junit和Hamcrest以及Eclemma,以及其使用方法。 (2)编写软件测试中经典的三角形问题的代码,并且为其设计测试用例,用Junit来调试此程序。 (1)安装Junit和Hamcrest (2)安装Eclemma (3)写一个java程序解决三 阅读全文
posted @ 2016-03-19 21:49 lsy2012 阅读(916) 评论(0) 推荐(0) 编辑
摘要: 1, findLast() (1) The fault is that the state of the loop should be: for(int i = x.length-1;i >= 0;i--) Because if the expected index is in x[0], when 阅读全文
posted @ 2016-03-09 11:41 lsy2012 阅读(284) 评论(0) 推荐(0) 编辑
摘要: Generally to say, it's a homework that arranged by my Software Testing Professor, but it makes me recall a lot of interesting errors, which made by me 阅读全文
posted @ 2016-03-06 17:09 lsy2012 阅读(299) 评论(1) 推荐(1) 编辑