本周的学习包括两章内容,分别为异常和递归。html
《Java中IO总结》java
//这是递归 int funcA(int n) { if(n > 1) return n+funcA(n-1); else return 1; } //这是迭代 int funcB(int n) { int i,s=0; for(i=1;i<n;i++) s+=i; return s; }
问题1:We compare sorting algorithms by examining
A the number of instructions executed by the sorting algorithm
B the number of instructions in the algorithm itself (its length)
C the types of loops used in the sorting algorithm
D the amount of memory space required by the algorithm
E whether the resulting array is completely sorted or only partially sorted
分析:这道题考到的知识点为:不一样的排序算法在执行时须要不一样数量的指令。因此咱们经过检查排序算法执行的指令数,来比较排序算法。因此应该选a。git
问题2:Polymorphism is achieved by
A . overloading(重载)
B . overriding(重写)
C . embedding(嵌入)
D . abstraction(抽象)
E . encapsulation(封装)
分析:这道题考查的是多态性是经过什么实现,我选择的是的抽象,而答案是b重写:重写提供了多态性,由于适当的方法是根据当前被引用的对象而调用的,因此应该是重写实现多态性。程序员
这一周在作课后项目时问题不大,可是在作是四则运算的编写时遇到了不少问题,须要继续努力研究。算法
代码行数(新增/累积) | 博客量(新增/累积) | 学习时间(新增/累积) | 重要成长 | |
---|---|---|---|---|
目标 | 5000行 | 30篇 | 400小时 | |
第一周 | 180/180 | 2/2 | 20/25 | |
第二周 | 312/414 | 2/4 | 20/45 | |
第三周 | 557/971 | 1/5 | 25/70 | |
第四周 | 1217/2242 | 2/7 | 44/114 | |
第五周 | 734/2976 | 1/8 | 24/138 | |
第六周 | 523/3509 | 1/9 | 20/158 | |
第七周 | 697/4206 | 1/10 | 24/182 | |
第八周 | 1118/5324 | 3/13 | 30/212 | |
第九周 | 656/5980 | 2/15 | 20/232 |
参考:软件工程软件的估计为何这么难,软件工程 估计方法编程
计划学习时间:20小时数据结构
实际学习时间:20小时函数
改进状况:oop
这周对于课后练习作的没有那么吃力,但仍是存在一些对于类的编写的问题,但愿继续加油。学习