摘要: Task: Use the following method printPrimes() for questions a-d. (a) Draw the control flow graph for the printPrimes() method.(b) Consider test cases t 阅读全文
posted @ 2018-03-26 11:39 whoohoo 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Junit、Hamcrest、Eclemma的安装和使用 1.任务要求 Tasks: a) Description of triangle problem: Function triangle takes three integers a,b,c which are length of triang 阅读全文
posted @ 2018-03-25 17:02 whoohoo 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 第一段代码分析 分析: 代码运行的结果与预期不同,输出值为-1。出现这种情况的原因在于,程序中的for循环语句出现错误,i>0应改为i>=0,因为如果是按照原程序的i>0则无法判断x数组的第一位是否等于y的值,导致最后运行结果出现偏差。 用可以正常运行的test case进行测试: 输出结果正确: 阅读全文
posted @ 2018-03-14 12:09 whoohoo 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Impressive Error 在完成上个学期的计算机图形学最后的大作业过程中,试图将从网上找到的.obj格式的模型导入OpenGL中,正常情况应该是根据设定的路径读取.obj然后显示,但是实际效果却出现了偏差,程序运行没有错误,但是只有一个黑色背景没有模型,移动鼠标改变镜头角度和位置也没有效果。 阅读全文
posted @ 2018-03-12 13:28 whoohoo 阅读(110) 评论(0) 推荐(0) 编辑