2018年3月26日

LAB1

摘要: 1.导入 JUnit,Hamcrest Project -> Properites -> Java Build Path -> Add External JARs 2. 安装 Eclemma Help -> Eclipse marketplace 搜索 Eclemma,点击Installed 3. 阅读全文

posted @ 2018-03-26 22:09 arafatal 阅读(109) 评论(0) 推荐(0) 编辑

homewokr3

摘要: (a) Draw the control flow graph for the printPrime() method. (b) Consider test cases ti = (n = 3) and t2 = ( n = 5). Although these tour the same prim 阅读全文

posted @ 2018-03-26 22:05 arafatal 阅读(204) 评论(0) 推荐(0) 编辑

2018年3月14日

HOMEWORK2

摘要: 题目一: 1.Fault: 循环条件没设置好,i > 0会导致循环无法进行到数组第一项,应该改成 i >= 0。 2.数组x为空时,会抛出空指针错误,循环无法执行,也不会执行上面叙述的Fault。 3.只要满足数组x[0]不是与y相等的唯一的元素即可避免Error,比如测试用例 x = [1, 2, 阅读全文

posted @ 2018-03-14 15:33 arafatal 阅读(98) 评论(0) 推荐(0) 编辑

2018年3月12日

Java 代码中的可能未初始化变量问题

摘要: 出现的错误: import java.util.Scanner;public class tickets {public static void main(String[] args) {Scanner stdin=new Scanner(System.in);System.out.println( 阅读全文

posted @ 2018-03-12 21:11 arafatal 阅读(7698) 评论(0) 推荐(0) 编辑

导航