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
Mobile Programming Inheritance
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
yuichiro_takahashi
November 26, 2018
Technology
180
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
700
App Clip - in a nutshell
yuichirokato
0
400
巨大な機能を VIPER + MicroViewController でいい感じに実装した話
yuichirokato
1
860
Mobile Programming Protocol Extension
yuichirokato
0
100
Mobile Programming Protocol
yuichirokato
0
110
Mobile Programming enum
yuichirokato
0
200
Mobile Programming Optional
yuichirokato
0
160
Mobile Programming Struct
yuichirokato
0
150
Mobile Programming Initializer Beta
yuichirokato
0
160
Other Decks in Technology
See All in Technology
3つのアプローチで目指す チームを強くするAI駆動開発
thkt
0
140
自作バイナリを動かす「入口」8選
puhitaku
1
1.2k
「事実」を「計測」して、「解釈」する 〜AWS Lambdaのメモリ最適解の見つけ方〜
maimyyym
0
120
Essential architectural thinking (revised edition)
ufried
0
110
継続的なAIコスト最適化
bgpat
1
270
Incremental HTTP
kazuho
5
2.1k
freeeらしさをAIとともに作る / Creating the freee Experience with AI
ymrl
0
220
AgentCoreで実践するハーネスエンジニアリング
yakumo
1
290
Deep Data Security 機能解説
oracle4engineer
PRO
2
740
AI時代に必要な脅威モデリング― 変化の速度に負けない理解とリスク判断
masakane55
5
1.2k
不可逆な意思決定を避けながら10億超の顧客データを AI Ready にするデータ基盤設計
baseballyama
1
240
Kiro Crewをはじめよう
kizawa2020
1
110
Featured
See All Featured
Discover your Explorer Soul
emna__ayadi
2
1.3k
Why Our Code Smells
bkeepers
PRO
340
58k
How to make the Groovebox
asonas
2
2.5k
Done Done
chrislema
187
17k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
450
Music & Morning Musume
bryan
48
7.4k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
The untapped power of vector embeddings
frankvandijk
2
1.9k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
300
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
720
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
490
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() // ϠυϯͷͶΜΓ͖ʂͱදࣔ͞ΕΔ(͍ͨ͋ͨΓͰͳ͍)