本週的學習包括兩章內容,分別爲異常和遞歸。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
這周對於課後練習作的沒有那麼吃力,但仍是存在一些對於類的編寫的問題,但願繼續加油。學習