日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

20172307 2017-2018-2 《程序设计与数据结构》第9 周学习总结

發布時間:2024/1/17 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 20172307 2017-2018-2 《程序设计与数据结构》第9 周学习总结 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

20172307 2017-2018-2 《程序設計與數據結構》第9周學習總結

教材學習內容總結

  • 十一章
    1.異常的定義。和錯誤不同的是,異常可以拋出,錯誤代表不可恢復的問題必須進行捕獲處理。
    2.try-catch語句:try語句后可以跟一條或多條catch語句。如果try語句后沒有catch語句就會出現NullPointException錯誤。
    3.Finally語句:無論try語句塊正常退出或由于拋出異常而推出,都將執行finally語句。
    4.異常的傳遞:在一處異常沒有被處理,異常就會傳遞到上級方法進行處理。
    5.I/O:三種標準I/O流:(1).System.in標準輸入流。(2).System.out標準輸出流。(3).System.err標準錯誤流。
    6.可檢測異常與不可檢測異常:java中唯一的不可檢測異常是RuntimeException類的對象或該類的后代類對象。
  • 十二章
    1.遞歸是一種編程技術,允許一個方法調用自己以達到最終目的。
    2.無窮遞歸:方法中包含非遞歸部分和遞歸部分,如果沒有非遞歸部分,就會出現無窮遞歸的情況。
    3.間接遞歸:一個方法調用其他方法,其他方法中有這個方法,最終也實現了遞歸,這種情況是間接遞歸。

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

  • 問題1:對流的概念不太清楚。
  • 問題1解決方案:通過查閱網上的資料對流有了大概的了解。流像是一個管道連接著輸入和輸出兩端,一個留的方向是固定的,他通過占據一定的內存每次傳輸一定的數據信息。
    流是一個類,傳輸信息要調用這個類里的方法。
    參考至:(Java Stream簡介, 流的基本概念)

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

  • PP12.1還算順利吧,就一開始找思路的時候不太清楚要在哪用到遞歸
  • 解決方式:最后找到方法在左加右減的那里做遞歸。代碼如下:
static boolean pal(int left, int Right, String str) {boolean result = true;if (str.charAt(left) == str.charAt(Right) && left < Right) {left++;Right--;pal(left, Right, str);}elseresult = false;return result;
  • PP12.9沒有想到該怎樣儲存數據
  • 在參考趙曉海同學的想法后用二維數組來儲存,自己一直沒想到二維數組,以后要加深理解。

代碼托管

上周考試錯題總結

  • A Java program can handle an exception in several different ways. Which of the following is not a way that a Java program could handle an exception?
    A . ignore the exception
    B . handle the exception where it arose using try and catch statements
    C . propagate the exception to another method where it can be handled
    D . throw the exception to a pre-defined Exception class to be handled
    E . all of the above are ways that a Java program could handle an exception
    錯誤:D 正確:E
    解析:java處理異常的三種方式:1.根本不處理異常。2.當異常發生時處理異常。3.在程序的某個位置集中處理異常。
  • An exception can produce a "call stack trace" which lists:
    A . the active methods in the order that they were invoked
    B . the active methods in the opposite order that they were invoked
    C . the values of all instance data of the object where the exception was raised
    D . the values of all instance data of the object where the exception was raised and all local variables and parameters of the method where the exception was raised
    E . the name of the exception thrown
    錯誤:D 正確:B
    解析:調用
  • An exception that could also arise in the try statement that does not have an associated catch statement is:
    A . ClassNotFoundException
    B . IllegalArgumentException
    C . NegativeArraySizeException
    D . NullPointException
    E . OutOfMemoryException
    錯誤:A 正確:D
    解析:try語句后沒有catch語句會出現NullPointException

結對及互評

  • 本周結對學習情況
    • 20172311
    • 對四則運算的進一步討論!對IO異常的處理及文件的寫入
  • 上周博客互評情況
    • 20172311

其他

遞歸還是蠻難的,看例子的時候就十分困難,感覺還是需要繼續學習遞歸。

學習進度條

代碼行數(新增/累積)博客量(新增/累積)學習時間(新增/累積)重要成長
目標5000行30篇400小時
第一周200/2002/220/20
第二周300/5001/318/38
第三周500/10001/422/60
第四周300/13001/530/90
第五周700/ 20001/630/120
第六周792/27921/730/150
第七周823/35591/830/180
第八周774/43333/930/ 210
第九周426/47592/1130/ 240

參考資料

  • 《Java程序設計與數據結構教程(第二版)》

  • 《Java程序設計與數據結構教程(第二版)》學習指導
  • Java Stream簡介, 流的基本概念

轉載于:https://www.cnblogs.com/20172307hyt/p/9032883.html

總結

以上是生活随笔為你收集整理的20172307 2017-2018-2 《程序设计与数据结构》第9 周学习总结的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。