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
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
3k
BDD in .NET - TDD 在實務上的最後一塊拼圖
hatelove
4
2.9k
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.6k
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
Webフレームワークの ベンチマークについて
yusukebe
0
160
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
2
1k
ふつうのFeature Flag実践入門
irof
7
3.7k
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
260
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4k
技術記事、 専門家としてのプログラマ、 言語化
mizchi
4
1.9k
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
230
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
2
560
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.6k
AI時代のUIはどこへ行く?その2!
yusukebe
21
7k
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
110
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
4.9k
Featured
See All Featured
Six Lessons from altMBA
skipperchong
29
4.3k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
How to build a perfect <img>
jonoalderson
1
5.6k
Scaling GitHub
holman
464
140k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
300
Producing Creativity
orderedlist
PRO
348
40k
WENDY [Excerpt]
tessaabrams
11
38k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
390
WCS-LA-2024
lcolladotor
0
630
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
580
The browser strikes back
jonoalderson
0
1.2k
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