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
OO training homework 1 review and summary
Search
hatelove
July 20, 2012
Technology
8.2k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
OO training homework 1 review and summary
將大家 homework 1 需注意的地方,延伸思考的部分提出來。
hatelove
July 20, 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
Object Oriented Training - Session 4
hatelove
1
5.2k
Object Oriented Training - Session 3
hatelove
1
11k
Object Oriented Training - Session 2
hatelove
1
4.9k
Object Oriented Training - Session 1
hatelove
1
8.4k
Other Decks in Technology
See All in Technology
AIエージェントの監視、思考を見るか行動を見るか / Monitoring AI Agents: Thoughts or Actions
yusukeshimizu
1
140
令和の今、あらためて IAM を考える。アクセスキーを「無くせない現実」との向き合い方
kazzpapa3
0
140
増え続けるプロダクトの品質をどう担保するか。ProductSpecとTypeScriptによる取り組み
joere
3
380
自律的なチームを作るためにTechPMがやらないこと
ny7760
1
510
AIエージェント統制はAPIから——押さえるべき5つの要素
nagix
0
120
レガシーコードに対する loop engineering的なAI開発プロセス導入について
kubell_hr
0
220
AIコーディングはじめました
miso
0
150
攻撃 3 時間 vs 復旧 10 時間。アクセスキー流出の非対称性を体感するために CTF を作った話
kazzpapa3
1
140
Flutter Widget Previewerで始めるUIプレビューとVRTの自動化
sakusaku3939
0
210
AIで選択肢が広がった組織設計の理想と現実
konifar
16
7.7k
bpf_arenaとstruct_opsを使うのが難しかった話
masu_mi
1
120
Strands Decider 2BでAWSアップデートの目利きをしてみた
sato4mi
1
110
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
96
6.9k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
390
Making the Leap to Tech Lead
cromwellryan
135
10k
A Modern Web Designer's Workflow
chriscoyier
699
190k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
47k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
550
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
620
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
350
How STYLIGHT went responsive
nonsquared
100
6.3k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
A better future with KSS
kneath
240
18k
Transcript
Date: 2012/05/21 OO training – homework 1 review
作業整理摘要
- 3 - 物件職責 • 將商品資訊聚合成為Entity • 把new Class的動作,與使用Class的動作隔開 •
物流商是否具有長、寬、高、重點等商品屬性 • 商品上是否應該擁有計算運費的方法 • 物流商的名稱,是否可由外部設定
- 4 - 重構 • 重構應確保重構後的結果,與重構前相同 – 工具 • Selenium
• 單元測試 – 例子 • 物流商配置顛倒 • double改成float或int • 衍生設計 • Visual Studio重構功能 – 擷取方法 – 擷取介面 – 封裝欄位
- 5 - DRY • 判斷式中,重複出現相同的程式碼,是否可以移出判斷式之 外 • 子類與父類相同的部份,是否只需放在父類 •
抽象來看,是否相同,不同的地方在哪
- 6 - 建議 • 每個Class獨立一個檔案 • 預設的todo註解請記得清除 – 工作清單視窗
- 7 - 衍生需求 • 當每間物流商計算運費所需要的商品資訊增加時,該如何修 改程式 • 低溫冷藏時,計算運費的方式不同 •
頁面新需求為,選擇最便宜的物流商,並呈現運費結果
- 8 - 課程補充 • new與override • overload
- 9 - Step • 把計算運費抽出來,成為BL – abstract – interface
• 把new class與使用class隔開 – function – Factory class • 把商品資訊定義成Entity • 抽象工廠 • 物流商名稱使用Enum Description
Q & A