20162302 2016-2017-2 《程序設計與數據結構》第五周學習總結
教材學習總結
了解有關類和對象的相關內容
研究類之間的關系
方法定義結構
教材學習中的問題和解決過程
-
問題1:修改過程中,改了很多次這個都還存在
-
問題1解決方案:
引用了其他public里面的內容 -
問題2:
在運行過程中只能執行一次 -
問題2解決方案:
缺少while循環 -
問題3:
-
問題3解決方案:缺少一個long
代碼調試中的問題和解決過程
代碼托管
上周考試錯題總結
- 教材P103頁代碼SnakeEyes.java的運行結果是固定的。(False)
這個代碼是模擬擲骰子,結果隨機。 - 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對象)(D)
A .Scanner inputFile = new Scanner(“input.txt”);
B .Scanner inputFile = new Scanner(new InputFile(“input.txt”);
C .Scanner inputFile = new Scanner(new File(input.txt);
D .Scanner inputFile = new Scanner(new InputFile(input.txt);
E .Scanner inputFile = new Scanner(new File(“input.txt”);
Scanner需要將文件對象引用為參數,所以選擇A、B和D是不正確的。文件對象的構造函數包含一個字符串,所以選擇C是不正確的。因此,選擇E是正確的。 - 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方法的描述,下面哪個選項最為合適?)
A .Program statements are all executed at the same time.(程序語句同時執行)
B .Program statements are executed according to their priority, which is specified by the programmer.(程序語句根據程序員指定的優先級按優先級執行)
C .Program statements are executed linearly, with earlier statements being executed first.(程序語句順序執行,前面的語句先執行)
D .Program statements are executed linearly, with later statements being executed first.(程序語句順序執行,后面的語句先執行)
E .Some program statements are executed at the same time, and others are executed in a linear manner. (有的程序語句同時執行,有的語句順序執行)
ava程序中的程序語句的執行線性當沒有條件語句或循環。這意味着在代碼中出現較早的語句在代碼后面出現的語句之前執行。
結對及互評
點評過的同學博客和代碼
其他(感悟、思考等,可選)
學習進度條
代碼行數(新增/累積) | 博客量(新增/累積) | 學習時間(新增/累積) | 重要成長 | |
---|---|---|---|---|
目標 | 5000行 | 30篇 | 400小時 | |
第一周 | 24/2237 | 1/6 | 13/123 | |
第二周 | 496/2237 | 1/6 | 26/123 | |
第三周 | 326/2237 | 1/6 | 24/123 | |
第四周 | 909/2237 | 2/6 | 36/123 | |
第五周 | 506/2237 | 1/6 | 24/123 |
嘗試一下記錄「計划學習時間」和「實際學習時間」,到期末看看能不能改進自己的計划能力。這個工作學習中很重要,也很有用。
耗時估計的公式
:Y=X+X/N ,Y=X-X/N,訓練次數多了,X、Y就接近了。
-
計划學習時間:24小時
-
實際學習時間:24小時
-
改進情況:
(有空多看看現代軟件工程 課件
軟件工程師能力自我評價表)