Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
08/27 OOP 設計
Search
crazylion
August 27, 2015
Technology
0
210
08/27 OOP 設計
講師: 遠遠
crazylion
August 27, 2015
Tweet
Share
More Decks by crazylion
See All by crazylion
IDF 使用者心理課程
crazylion
1
110
InTouch: Crossing Social Interaction with Perception
crazylion
0
270
The Twins: Lighting Design Based on Rich Movements
crazylion
0
130
HexDeck: Gamification of Tangibles for Brainstoming
crazylion
0
650
Interaction Design Paradigms
crazylion
0
190
Paradigm Construction & Manifestos in interaction design
crazylion
0
250
批判設計初探
crazylion
0
260
Generative Algorithms 第四章 - Transformation
crazylion
0
200
Generative Algorithms V2 第二章
crazylion
2
280
Other Decks in Technology
See All in Technology
AI工学特論: MLOps・継続的評価
asei
10
1.6k
メモ整理が苦手な者による頑張らないObsidian活用術
optim
0
120
東京海上日動におけるセキュアな開発プロセスの取り組み
miyabit
0
140
Microsoft Fabric ガバナンス設計の一歩目を考える
ryomaru0825
1
260
組織内、組織間の資産保護に必要なアイデンティティ基盤と関連技術の最新動向
fujie
0
510
分散トレーシングによる コネクティッドカーのデータ処理見える化の試み
thatsdone
0
220
経験がないことを言い訳にしない、 AI時代の他領域への染み出し方
parayama0625
0
160
なぜAI時代に 「イベント」を中心に考えるのか? / Why focus on "events" in the age of AI?
ytake
2
590
少人数でも回る! DevinとPlaybookで支える運用改善
ishikawa_pro
1
400
M365アカウント侵害時の初動対応
lhazy
7
4.6k
経理出身PdMがAIプロダクト開発を_ハンズオンで学んだ話.pdf
shunsukenarita
1
130
QuickBooks®️ Customer®️ USA Contact Numbers: Complete 2025 Support Guide
qbsupportinfo
0
110
Featured
See All Featured
Six Lessons from altMBA
skipperchong
28
3.9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
47
9.6k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
Writing Fast Ruby
sferik
628
62k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
850
Transcript
OOP 物件導向程式設計
OOP ⬜ 講到OOP (Object-Oriented Programming) 物件 導向程式設計 ⬜ 我們想到 …
⬜ Smalltalk,Java,C#,C++(支援) … 物件導向程式 語言(OOPL:Object-Oriented Programming Language)
OOP > OOPL ⬜ 物件導向程式語言是基於OO概念設計的語言 ⬜ 物件導向程式語言不是物件導向程式設計的全部 ⬜ 物件導向程式語言協助易於實現物件導向程式設 計
⬜ 用OOPL寫出不OO的程式 – 程序導向 ⬜ 用非OOPL寫出具OO概念的程式 ◼ (Google:javascript oop)
程序導向 & 物件導向 ⬜ 程序導向 ◼ 功能目的 ◼ 動作 ◼
程序 ◼ 工作流思考模式 (一連串函式呼叫,一連串電腦指令) ▫ UML Sequence diagram ▫ http://www.smileytech. net/school/CS471_Project_WebSite_files/OverallSequence.gif ⬜ 物件導向 ◼ 物件導向就是要基於物件阿 ~ ▫ 專注於將系統裡的各部分抽象為物件,系統為一群物件的交互作用 而運作。 ▫ 個別物件擁有各自的屬性(資料)與方法(動作行為)。 ▫ 某種角度上物件導向概念更貼近現實環境。
OOP 物件導向程式設計 物件導向是一種概念,思維,設計方式。
歷史 ⬜ 1960年代 Kristen Nygaard & Ole-Johan Dahl 物件導向之父 ⬜
An Object is anything to which a concept applies. It is an instance of a concept. ⬜ 宏觀:電視、手機、汽車 … ⬜ 微觀:螢幕、按鍵、輪胎、零組件 … ⬜ 抽象概念:會議、訂購行為 …
源起 ⬜ 程序導向程式設計面臨靈活性,重用性,擴充性 與維護等難題。 ⬜ 物件導向程式設計:將系統各部分視為獨立個體 相互協作。 ◼ 積木 ⬜
類比於現實生活的映射,更容易理解。便於分析、 設計與管理。-- 譬喻法
基本理論 ⬜ 類別 (Class) ◼ 類別(class)是藍圖,規格書,模板。定義該物的屬性(資 料)與方法(動作行為)。 ⬜ 物件 (Object)
◼ 物件(object)是類別的一個實例。 物件 → 類別 (抽象化) 類別 → 物件 (實例化)
基本理論 1 ⬜ 封裝 (Encapsulation) ◼ 資料隱藏 ◼ 降低能見度 →
減低依賴性 (低耦合) ⬜ 繼承 (Inheritance) ◼ Reuse 程式碼重用 ◼ 多重繼承 ⬜ 多型 (Polymorphism) ◼ 同名異式 ◼ 相同名稱的方法可以有不同的程式碼。 ◼ 覆寫 Override
基本理論 2 ⬜ 介面 (Interface) ◼ 描述不同類別的共通行為。 ◼ 規範、規格(開發角度)
進階理論 ⬜ 抽象方法 ⬜ Design Pattern
學習OOP ⬜ 初步可選定一物件導向程式語言學起 ⬜ 建立概念 ⬜ 練習系統分析抽象化 ⬜ 日常生活觀察映射 –
譬喻法
參考資料 ⬜ 不受侷限,多點想像。 ⬜ http://blog.roodo. com/rocksaying/archives/4963259.html ⬜ http://www.kenming.idv. tw/ac_eb_af_cu_af_eo_eu_ascci_a_c_carpad_a