• A-
  • A
  • A+
03-5715131#35401 mengfen@mx.nthu.edu.tw Ms. Wu
【7/31】114學年度第2學期研究生論文口試結束Thesis Defense Ends   ♠   【8/1】115學年度第1學期開始 2026 Fall Semester Begins   ♠   【8/3】暑期班申請課程停修開始(至7日止) Summer Session Withdrawal (8/3-   ♠   【8/18】115學年度入學各級新生、轉學生選課(至20日止) Course Selection for   ♠   【8/21】暑期班結束 Summer Session Ends   ♠   【9/1】教師送繳115學年度暑碩專班成績截止   ♠   【9/1-2】新生領航營(至2日止)   ♠   【9/3-18】受理校際選課(至18日止) Inter-School Selection (9/3-9/18)   ♠   【9/4-7】受理就學貸款申請(4日、7日兩天)   ♠   【9/3-18】受理校際選課(至18日止) Inter-School Selection (9/3-9/18)   ♠   【9/4-7】受理就學貸款申請(4日、7日兩天)   ♠   【9/7】全校各級學生上課開始、註冊日 1. Class Begin 2. Registration   ♠   【9/7-30】弱勢助學金申請(至30日止)   ♠   【9/7】生輔組校內外獎學金申請(依 生輔組公告辦理)   ♠   【9/25】中秋節 Mid-Autumn Festival (no class)   ♠   【9/28】教師節 Teacher's Day (no class)   ♠   【9/29-11/20】期中教學意見反映(至11月20日止) Mid-term Feedback on Teaching   ♠   【10/9-10】國慶日補假 Holiday-Double Tenth Day (no class)國慶日 Double Tenth Day (no class)   ♠   【10/19-12/4】期中成績預警開始(至12 月4日止) Academic Warning System Starts   ♠   【11/11】全校運動大會(停課一天) Sports Day   ♠   【11/27-12/20】教學意見調查開始(至12月20日止) Online Course Evaluation (11/27-   ♠   【12/21-24】期末考試開始(至24日止) Final Exams   ♠   【12/25】行憲紀念日 Constitution Day   ♠   【12/28】寒假開始 Winter Break Begins   ♠  

Title

Lecture 10 Derived Classes,Abstract Classes

第1節

L10A

第2節

L10B

第3節

L10C

第4節

L10D

Syllabus

章節大綱

*實作抽象資料練習-形狀(Abstract class - Shapes)


L10_A
         作業檢討
         (Homework discussion)

         實作抽象資料練習-形狀
         (Abstract class - Shapes) 
         -Pure virtual function
          (-Pure virtual function)
          destructor
          (-Public member funtions : center()、shift()、rotate()、
          draw() & destructor)


L10_B
         實作抽象資料練習-形狀
         (Abstract class - Shapes)
          -vector
          (-vector
           & bounding()
          (-Functions in main() : draw_all()、move_all()、
           rotate_all() & bounding())

         -Class的各種member function的使用權限  
          (-Access control)


L10_C
         自己定List
         (Build list)
          -Template
         (-Template)
         -Smart pointers: shared_ptr
          (-Smart pointers: shared_ptr)
        -List的建構子
          (Constructors for list)
         -List public函數簡介 : isEmpty()、car()、cdr()、show()
         (-Overview of public fuctions of list : isEmpty()
            、car()、cdr()、show())

          -操作list的函數簡介
          (-Overview of functions for list)
        -建造list : cons(a,list)
          (-Build a list: cons(a,list))

 

L10_D
         自己定List
         (Build list)
          -個別操作list中元素 : mapl(function,list)
         (-Manipulate individual components in list :
            mapl(function,list))

         -無名函數
         (-Lambda function)
          -篩選list中元素 : filter(condition,list)
         (- Choose components in list: filter(condition,list))
         -串起兩個list : concat(list1,list2)
          (- Concatenate two lists : concat(list1,list2))
         -List中元素排序 : qqsort(list)
         (-Sort components in list : qqsort(list))

 

 陳煥宗教授-程式設計二講義