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
Mobile Programming Inheritance
Search
yuichiro_takahashi
November 26, 2018
Technology
170
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Mobile Programming Inheritance
モバイルプログラミングの授業で使うスライドです
yuichiro_takahashi
November 26, 2018
More Decks by yuichiro_takahashi
See All by yuichiro_takahashi
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
590
App Clip - in a nutshell
yuichirokato
0
390
巨大な機能を VIPER + MicroViewController でいい感じに実装した話
yuichirokato
1
850
Mobile Programming Protocol Extension
yuichirokato
0
96
Mobile Programming Protocol
yuichirokato
0
100
Mobile Programming enum
yuichirokato
0
190
Mobile Programming Optional
yuichirokato
0
150
Mobile Programming Struct
yuichirokato
0
140
Mobile Programming Initializer Beta
yuichirokato
0
150
Other Decks in Technology
See All in Technology
Comment regagner la souveraineté de vos données tout en étant payé grâce à Nostr !
rlifchitz
0
150
iOS アプリの「これって不具合ですか?」を AI に調べてもらう
miichan
0
130
事業会社における 機械学習・推薦システム技術の活用事例と必要な能力 / ml-recsys-in-layerx-wantedly-2026
yuya4
0
120
5分でわかるDuckDB Quack
chanyou0311
2
180
徹底討論!ECS vs EKS!
daitak
3
1.3k
AI時代のコスト管理を考えよう〜明日から使える実践AWSノウハウ~
yoshimi0227
0
750
不要なレビューをAIにまかせて AIコーディングの環境改善を加速した
shoota
1
250
SONiCで構築・運用する生成AI向けパブリッククラウドネットワーク ~実装編~
sonic
0
320
脱SaaS!FDEを支えるプロビジョニングと分離設計
knih
0
260
クレデンシャル流出 ― 攻撃 3 時間 vs 復旧 10 時間。この非対称性にどう備えるか
kazzpapa3
3
470
Kiro Ambassador を目指す話
k_adachi_01
0
110
ザ・データベース、MySQL ~ OSC 2026 Sendai ~
sakaik
0
170
Featured
See All Featured
The Mindset for Success: Future Career Progression
greggifford
PRO
0
360
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
780
Color Theory Basics | Prateek | Gurzu
gurzu
0
370
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
950
The Curse of the Amulet
leimatthew05
1
13k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
330
Done Done
chrislema
186
16k
Building the Perfect Custom Keyboard
takai
2
800
Transcript
ܧঝ MOBILE PROGRAMMING 26TH NOV
1. ܧঝʹ͍ͭ ͯ
ςΩετ ܧঝͬͯʁ ▸ Ϋϥε͕࣋ͭػೳͷҰͭ ▸ ͕࣋ͭϓϩύςΟϝιουΛड͚ܧ͙ ▸ ܧঝݩͷΫϥεΛΫϥε(super class) ▸
ܧঝઌͷΫϥεΛࢠΫϥε(sub class)ͱ͍͏ ▸ จ๏ class SubClass: Super Class { ... } ▸ swift Ͱ͏ॴݶΒΕΔ ▸ جຊతʹϙϦϞʔϑΟζϜ(ଟଶੑ)ͷͨΊʹΘΕΔ
ςΩετ ࣮ࡍͷίʔυ class Pokemon { let name: String var ability:
String var level: Int = 0 init(name: String, level: Int, ability: String = "͍ͨ͋ͨΓ") { self.name = name self.level = level self.ability = ability } func displayStatus() { print("\(self.name)ͷϨϕϧ\(self.level)Ͱ͢ɻ") } func doAbility(to pokemon: Pokemon) { print("\(self.name)\(pokemon.name)ʹ\(self.ability)ͨ͠ʂ") } } class Metagross: Pokemon { init(level: Int) { super.init(name: "ϝλάϩε", level: level, ability: "ίϝοτύϯν") } }
2. Ϋϥεͱ ࢠΫϥε
ςΩετ ΫϥεͱࢠΫϥε ▸ جຊతʹࢠΫϥε͔ΒΫϥεͷϓϩύςΟϝιουશͯΞΫ ηεՄೳ ▸ ͦͷࡍself ͷΘΓʹsuperΛ͏ ▸ ࢠΫϥεͰΫϥεͷϝιουΛॻ͖͑Δ͜ͱ͕Ͱ͖Δ
▸ ͜ΕΛϝιουͷΦʔόʔϥΠυͱݴ͏ ▸ ࢠΫϥεʹ৽͘͠ϝιουϓϩύςΟΛఆٛ͢Δ͜ͱ͕Ͱ͖Δ ▸ ࢠΫϥεΫϥεͷܕҾ͖ܧ͙
ςΩετ ࣮ࡍͷίʔυ class Pokemon { let name: String // pokemon's
name (ex pikachu) fileprivate(set) var level: Int // pokemon's level fileprivate(set) var health: Int = 1 // pokemon's hit point init(name: String, level: Int) { self.name = name self.level = level self.health = level * 2 } func displayStatus() { print("Name: \(self.name)") print("Lv: \(self.level)") print("HP: \(self.health)") } func doAbility() { print("\(self.name)ͷ͍ͨ͋ͨΓʂ") } } class Slowpoke: Pokemon { init(level: Int) { // ΫϥεͷϝιουΛݺͼग़͢ super.init(name: "Ϡυϯ", level: level) } // Ϋϥεʹఆٛ͞Ε͍ͯΔϝιουΛॻ͖͑Δ override func doAbility() { print("\(self.name)ͷͶΜΓ͖ʂ") } } let slowpoke: Pokemon = Slowpoke(level: 10) slowpoke.displayStatus() slowpoke.doAbility() // ϠυϯͷͶΜΓ͖ʂͱදࣔ͞ΕΔ(͍ͨ͋ͨΓͰͳ͍)