Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Object Oriented Training - Session 2
Search
hatelove
May 30, 2012
Programming
4.9k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Object Oriented Training - Session 2
interface, abstract 與 意圖導向設計(Top-Down)
hatelove
May 30, 2012
More Decks by hatelove
See All by hatelove
1. 在沙箱中開發
hatelove
12
3.1k
BDD in .NET - TDD 在實務上的最後一塊拼圖
hatelove
4
3k
OO training 基本原則整理
hatelove
2
5.3k
OO training homework 3 review and summary
hatelove
1
11k
OO training homework 2 review and summary
hatelove
1
4.7k
OO training homework 1 review and summary
hatelove
1
8.1k
Object Oriented Training - Session 4
hatelove
1
5.2k
Object Oriented Training - Session 3
hatelove
1
11k
Object Oriented Training - Session 1
hatelove
1
8.4k
Other Decks in Programming
See All in Programming
Security issues being discussed on Web Platforms
petamoriken
0
1.2k
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
260
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
400
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
160
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1.1k
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
170
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
200
SREの越境 / SRE Collaboration
y0hgi
2
280
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
270
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
680
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
360
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
350
Featured
See All Featured
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
610
Discover your Explorer Soul
emna__ayadi
2
1.3k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
900
Side Projects
sachag
456
43k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
42k
What's in a price? How to price your products and services
michaelherold
247
13k
Statistics for Hackers
jakevdp
799
230k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
470
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
310
The Mindset for Success: Future Career Progression
greggifford
PRO
0
510
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Transcript
Trainer: Joey Chen Date: 2012/05/21 Object Oriented Training – Session
2
請各小組長在30秒內,收集上面有數字的物品 [任務]前線支援
- 3 - Interface 91 I前線支援介面 +取得上面有數字 的物品()
Interface
- 5 - 明確實作介面?
明確實作介面:I地球人、I納美人 Demo
- 7 - 明確實作介面 • 依據使用的介面型別,決定呼叫的方法 • 直接使用類別,無法呼叫明確實作介面的方法 • 使用情境
– 介面方法簽章相同,但執行意義或內容不同時 – 限制只有面對該介面時,才可以被呼叫 – 泛型與非泛型類別 • IEnumerator與IEnumerator<T>
Abstract
- 9 - 水龍頭
- 10 - 水龍頭
- 11 - 相同的抽象,不同的實作
- 12 - More
- 13 - Abstract & Interface • 差異在哪 • 適用場景
• 組合使用的例子
- 14 - [任務]把大象放到冰箱 列出每個 步驟 標示出步驟 裡的主詞、 動詞與受詞 濃縮描述
Top-Down的設計方式 意圖導向設計
- 16 - 意圖導向設計 • 設計 – 行為的腳本(Scenario) – 抽象的描述每一個步驟
– 將步驟濃縮成一個動作 • 實作 – 每個步驟中的主詞、動詞、受詞標示出來 • 主詞:屬於哪一個類別 • 動詞:方法名稱 • 受詞:可能為method parameter,或return type – 方法執行後,主詞與受詞的狀態,有什麼樣的改變 • 形容詞:屬性
Visual Studio的『產生』功能 小技巧 Live Demo
作業1
- 19 - 作業1 - 說明 • 骰子點數決定manager – 1,2為Kevin
– 3,4為Jerry – 5,6為Jesse • Code review的流程都是 – WBS review – Todo review – SD review – Code review • 若SD review不通過,則不進行code review
- 20 - 作業1 - Tips • Code review的流程只有一份 •
什麼東西應該在Abstract上 • 什麼東西應該在Interface上 • 每個manager子類,都應該只有自己與眾不同的部分
- 21 - 作業2 – CPR急救方式 Scenario參考
- 22 - 作業2 - Tips • 第一層步驟為:叫、叫、A、B、C。 • 第三層步驟的實作
– 使用Console.WriteLine(“步驟描述”)即可
- 23 - 回顧
- 24 - 結論 • 限制,才會帶來彈性 • 一個系統的重用程度,看Abstract • 一個系統的抽象程度,看Interface
• 一個物件,只知道自己本身的內容,對外只依賴於抽象/介面
- 25 -
Thanks for your listening Q & A