# 20162319 2016-2017-2 《程序設計與數據結構》第5周學習總結


學號 2016-2017-2 《程序設計與數據結構》第X周學習總結

教材學習內容總結

1、再談類對象
2、類的剖析
3、封裝
4、方法的剖析
5、靜態類成員
6、類關系

教材學習中的問題和解決過程

  • 問題1:短路語句如何理解?
  • 問題1解決方案:短路語句例如||這類的語句如果不運用在代碼中那么當條件顯示錯誤時系統依然會自動進行運算。
  • 問題2:代碼中問題描述中的每一個名詞都能代表一個類嗎?
  • 問題2解決方案:不一定,有些名詞可能是其他對象的屬性,設計者很有可能會放棄使用其他一些名詞。

代碼調試中的問題和解決過程

  • 問題1:除了“==”還有什么代碼證明相等?
  • 問題1解決方案:!=
  • 問題2:代碼提示錯誤多的原因
  • 問題2解決方案:有很多時候代碼錯誤是因為賦值或者循環語句的錯誤而導致產生蝴蝶效應而錯誤增多

代碼托管

上周考試錯題總結

1、教材P103頁代碼SnakeEyes.java的運行結果是固定的。
沒有好好查看代碼 沒有動手
Die.java中 roll()中是調用了隨機數方法,每次運行結果不一樣。
2、Suppose we have an array of String objects identified by the variable names. Which of the following for loops will not correctly process each element in the array.(假如我們有一個名為names的String對象數組,下面哪個for循環不能遍歷數組中的每一個元素?)
Choice c will not process each element correctly due to a syntax error. The length variable is not a method and, therefore, does not have parenthesis after it. Choice b is an example of using a foreach loop to process an array, and choice a is a correct for loop.
3、Which of the following array declarations are invalid? (下面哪個數組聲明是不合法的)
數組沒有好好學
All three of these are valid array declarations. Choice b uses an alternate syntax. Choice c uses an initializer list to initialize the array.
4、The relational operators should not be used to test the equality of objects.(關系運算符不應當用於測試對象的相等性)
關系運算符沒想好
o test the equality of objects, the equals() method should be used.
5、Which of the following for loop headers will cause the body of the loop to be executed 10 times?(下面哪個循環頭能實現循環體執行10次?)
0與1弄混淆
The loop executes when i is equal to 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Therefore it executes exactly 10 times. Choice a and c execute 11 times, while choice a executes 9 times.
6、Suppose we wanted to process a text file called “input.txt” using the Scanner object. Which of the following lines of code correctly creates the necessary Scanner object?(假如我們想用Scanner對象處理文件名為“input.txt”的文本文件,下面哪行代碼正確的創建了Scanner對象)
The Scanner constructor needs to take a reference to a File object as a parameter, so choice a, b and d are incorrect. The constructor for a File object takes in a String, so choice c is incorrect. Therefore, choice e is correct.
7、Which of the following statements best describes the flow of control in the main method of a Java program that has no conditionals or loops? (在沒有條件和循環語句的情況下,對於Java程序中main方法的描述,下面哪個選項最為合適?)
Program statements in a Java program are executed linearly when there are no conditionals or loops. This means that statements that appear earlier in the code are executed before statements that appear later in the code.

結對及互評

20162301

評分標准

  1. 正確使用Markdown語法(加1分):

    • 不使用Markdown不加分
    • 有語法錯誤的不加分(鏈接打不開,表格不對,列表不正確...)
    • 排版混亂的不加分
  2. 模板中的要素齊全(加1分)

    • 缺少“教材學習中的問題和解決過程”的不加分
    • 缺少“代碼調試中的問題和解決過程”的不加分
    • 代碼托管不能打開的不加分
    • 缺少“結對及互評”的不能打開的不加分
    • 缺少“上周考試錯題總結”的不能加分
    • 缺少“進度條”的不能加分
    • 缺少“參考資料”的不能加分
  3. 教材學習中的問題和解決過程, 一個問題加1分

  4. 代碼調試中的問題和解決過程, 一個問題加1分

  5. 本周有效代碼超過300分行的(加2分)

    • 一周提交次數少於20次的不加分
  6. 其他加分:

    • 周五前發博客
    • 感想,體會不假大空
    • 排版精美
    • 進度條中記錄學習時間與改進情況
    • 有動手寫新代碼
    • 課后選擇題有驗證
    • 代碼Commit Message規范
    • 錯題學習深入
  7. 扣分:

    • 有抄襲的扣至0分
    • 代碼作弊的扣至0分
    • 遲交作業的扣至0分

點評模板:

  • 博客中值得學習的或問題:
    文字清晰明了 有邏輯性與學習性

  • 代碼中值得學習的或問題:
    遇到代碼問題不只是簡單的紙上談兵,會在得知錯題的情況下用虛擬機驗證

  • 基於評分標准,我給本博客打分:7分。得分情況如下:

    • 感想,體會不假大空
    • 排版精美
    • 進度條中記錄學習時間與改進情況
    • 有動手寫新代碼
    • 課后選擇題有驗證
    • 代碼Commit Message規范
    • 錯題學習深入
  • 參考示例

點評過的同學博客和代碼

其他(感悟、思考等,可選)

學習進度條

代碼行數(新增/累積) 博客量(新增/累積) 學習時間(新增/累積) 重要成長
目標 5000行 30篇 400小時
第一周 10/200 2/2 20/20
第二周 30/500 1/4 18/38
第三周 45/1000 2/7 22/60
第四周 300/1300 1/9 30/90

嘗試一下記錄「計划學習時間」和「實際學習時間」,到期末看看能不能改進自己的計划能力。這個工作學習中很重要,也很有用。
耗時估計的公式
:Y=X+X/N ,Y=X-X/N,訓練次數多了,X、Y就接近了。

參考:軟件工程軟件的估計為什么這么難軟件工程 估計方法

  • 計划學習時間:200小時

  • 實際學習時間:100小時

  • 改進情況:

(有空多看看現代軟件工程 課件
軟件工程師能力自我評價表
)

參考資料


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM