Submit Search
Upload
[2021] kotlin - inheritance
•
0 likes
•
230 views
W
Wei-Shen Lu
Follow
Kotlin Study group # 3 Inheritance Ref book: Kotlin A Brain-Friendly Guide
Read less
Read more
Technology
Report
Share
Report
Share
1 of 49
Download now
Download to read offline
Recommended
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
cprogrammings
What is OOP?
What is OOP?
Amin Uddin
Wavelet transform in image compression
Wavelet transform in image compression
jeevithaelangovan
Java
Java
Tony Nguyen
History Of JAVA
History Of JAVA
ARSLANAHMED107
NFA Converted to DFA , Minimization of DFA , Transition Diagram
NFA Converted to DFA , Minimization of DFA , Transition Diagram
Abdullah Jan
Kotlin
Kotlin
Ravi Pawar
Applet life cycle
Applet life cycle
myrajendra
Recommended
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
cprogrammings
What is OOP?
What is OOP?
Amin Uddin
Wavelet transform in image compression
Wavelet transform in image compression
jeevithaelangovan
Java
Java
Tony Nguyen
History Of JAVA
History Of JAVA
ARSLANAHMED107
NFA Converted to DFA , Minimization of DFA , Transition Diagram
NFA Converted to DFA , Minimization of DFA , Transition Diagram
Abdullah Jan
Kotlin
Kotlin
Ravi Pawar
Applet life cycle
Applet life cycle
myrajendra
Fundamentals of JAVA
Fundamentals of JAVA
KUNAL GADHIA
Garbage collection
Garbage collection
Mudit Gupta
Ch2 finite automaton
Ch2 finite automaton
meresie tesfay
Turing machine by_deep
Turing machine by_deep
Deepjyoti Kalita
Encapsulation
Encapsulation
Githushan Gengaparam
1 unit (oops)
1 unit (oops)
Jay Patel
Inheritance in Object Oriented Programming
Inheritance in Object Oriented Programming
Ashita Agrawal
Applets in java
Applets in java
Wani Zahoor
Digital image processing
Digital image processing
Muhammad Taha Sikander
Introduction to java
Introduction to java
Veerabadra Badra
Java rmi
Java rmi
kamal kotecha
Introduction to Java Programming
Introduction to Java Programming
Ravi Kant Sahu
Object detection
Object detection
Somesh Vyas
Java History
Java History
Prionto Abdullah
Basics of IPTV
Basics of IPTV
Ritul Sonania
History of java'
History of java'
deepthisujithra
Digital Image Processing 3rd edition Rafael C. Gonzalez, Richard E. Woods.pdf
Digital Image Processing 3rd edition Rafael C. Gonzalez, Richard E. Woods.pdf
ssuserbe3944
Java-java virtual machine
Java-java virtual machine
Surbhi Panhalkar
Presentation on Core java
Presentation on Core java
mahir jain
QSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and Jit
Qspiders - Software Testing Training Institute
GDSC Mikroskil Members Onboarding 2023.pdf
GDSC Mikroskil Members Onboarding 2023.pdf
gdscmikroskil
TIE CO Flat Classroom 2013
TIE CO Flat Classroom 2013
Toni Olivieri-Barton
More Related Content
What's hot
Fundamentals of JAVA
Fundamentals of JAVA
KUNAL GADHIA
Garbage collection
Garbage collection
Mudit Gupta
Ch2 finite automaton
Ch2 finite automaton
meresie tesfay
Turing machine by_deep
Turing machine by_deep
Deepjyoti Kalita
Encapsulation
Encapsulation
Githushan Gengaparam
1 unit (oops)
1 unit (oops)
Jay Patel
Inheritance in Object Oriented Programming
Inheritance in Object Oriented Programming
Ashita Agrawal
Applets in java
Applets in java
Wani Zahoor
Digital image processing
Digital image processing
Muhammad Taha Sikander
Introduction to java
Introduction to java
Veerabadra Badra
Java rmi
Java rmi
kamal kotecha
Introduction to Java Programming
Introduction to Java Programming
Ravi Kant Sahu
Object detection
Object detection
Somesh Vyas
Java History
Java History
Prionto Abdullah
Basics of IPTV
Basics of IPTV
Ritul Sonania
History of java'
History of java'
deepthisujithra
Digital Image Processing 3rd edition Rafael C. Gonzalez, Richard E. Woods.pdf
Digital Image Processing 3rd edition Rafael C. Gonzalez, Richard E. Woods.pdf
ssuserbe3944
Java-java virtual machine
Java-java virtual machine
Surbhi Panhalkar
Presentation on Core java
Presentation on Core java
mahir jain
QSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and Jit
Qspiders - Software Testing Training Institute
What's hot
(20)
Fundamentals of JAVA
Fundamentals of JAVA
Garbage collection
Garbage collection
Ch2 finite automaton
Ch2 finite automaton
Turing machine by_deep
Turing machine by_deep
Encapsulation
Encapsulation
1 unit (oops)
1 unit (oops)
Inheritance in Object Oriented Programming
Inheritance in Object Oriented Programming
Applets in java
Applets in java
Digital image processing
Digital image processing
Introduction to java
Introduction to java
Java rmi
Java rmi
Introduction to Java Programming
Introduction to Java Programming
Object detection
Object detection
Java History
Java History
Basics of IPTV
Basics of IPTV
History of java'
History of java'
Digital Image Processing 3rd edition Rafael C. Gonzalez, Richard E. Woods.pdf
Digital Image Processing 3rd edition Rafael C. Gonzalez, Richard E. Woods.pdf
Java-java virtual machine
Java-java virtual machine
Presentation on Core java
Presentation on Core java
QSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and Jit
Similar to [2021] kotlin - inheritance
GDSC Mikroskil Members Onboarding 2023.pdf
GDSC Mikroskil Members Onboarding 2023.pdf
gdscmikroskil
TIE CO Flat Classroom 2013
TIE CO Flat Classroom 2013
Toni Olivieri-Barton
Teaching opensource 2015
Teaching opensource 2015
Craig Gardner
Informal talk at pict
Informal talk at pict
Mayank Jain
Blended Learn - Today and Tomorrow - Disruptive
Blended Learn - Today and Tomorrow - Disruptive
DreamBox Learning
Blended Learning: Today and Tomorrow
Blended Learning: Today and Tomorrow
DreamBox Learning
Ai powered education
Ai powered education
DrEvelynBrindha
Object oriented programming interview questions
Object oriented programming interview questions
Keet Sugathadasa
EDT 6200 There's an App for That
EDT 6200 There's an App for That
EnochWilliams1
Road From Ryerson - Rachel Barreca, Andrew Bisnauth, Bailey Parnell
Road From Ryerson - Rachel Barreca, Andrew Bisnauth, Bailey Parnell
Ryerson Student Affairs
January 14 CET Committee Preso notes
January 14 CET Committee Preso notes
Charles F. Patton MS
Extreme Makeover 3 6 08
Extreme Makeover 3 6 08
Gayle Underwood
OSCC14: Using OpenSimulator in K-12 Schools
OSCC14: Using OpenSimulator in K-12 Schools
David W. Deeds
Flipping the classroom with i tunes u actem.pdf
Flipping the classroom with i tunes u actem.pdf
Sharon Chasse
LIBST110A - Summer 2013 - Section 2136 - Session 1
LIBST110A - Summer 2013 - Section 2136 - Session 1
mkinneyccclib
Teaching open source 2016
Teaching open source 2016
Craig Gardner
Object Oriented Programming
Object Oriented Programming
sharmisivarajah
Educational Google Apps.docx
Educational Google Apps.docx
StacyLevering
Educational Google Apps.docx
Educational Google Apps.docx
StacyLevering
Meet the Flat Classroom 2012
Meet the Flat Classroom 2012
Flat Classrooms
Similar to [2021] kotlin - inheritance
(20)
GDSC Mikroskil Members Onboarding 2023.pdf
GDSC Mikroskil Members Onboarding 2023.pdf
TIE CO Flat Classroom 2013
TIE CO Flat Classroom 2013
Teaching opensource 2015
Teaching opensource 2015
Informal talk at pict
Informal talk at pict
Blended Learn - Today and Tomorrow - Disruptive
Blended Learn - Today and Tomorrow - Disruptive
Blended Learning: Today and Tomorrow
Blended Learning: Today and Tomorrow
Ai powered education
Ai powered education
Object oriented programming interview questions
Object oriented programming interview questions
EDT 6200 There's an App for That
EDT 6200 There's an App for That
Road From Ryerson - Rachel Barreca, Andrew Bisnauth, Bailey Parnell
Road From Ryerson - Rachel Barreca, Andrew Bisnauth, Bailey Parnell
January 14 CET Committee Preso notes
January 14 CET Committee Preso notes
Extreme Makeover 3 6 08
Extreme Makeover 3 6 08
OSCC14: Using OpenSimulator in K-12 Schools
OSCC14: Using OpenSimulator in K-12 Schools
Flipping the classroom with i tunes u actem.pdf
Flipping the classroom with i tunes u actem.pdf
LIBST110A - Summer 2013 - Section 2136 - Session 1
LIBST110A - Summer 2013 - Section 2136 - Session 1
Teaching open source 2016
Teaching open source 2016
Object Oriented Programming
Object Oriented Programming
Educational Google Apps.docx
Educational Google Apps.docx
Educational Google Apps.docx
Educational Google Apps.docx
Meet the Flat Classroom 2012
Meet the Flat Classroom 2012
Recently uploaded
The transition to renewables in India.pdf
The transition to renewables in India.pdf
Competition Advisory Services (India) LLP
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
naman860154
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
Pixlogix Infotech
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
Neo4j
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Scott Keck-Warren
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Safe Software
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Enjoy Anytime
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
HostedbyConfluent
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
XfilesPro
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Alan Dix
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Delhi Call girls
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Ridwan Fadjar
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
ThousandEyes
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
AndikSusilo4
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
Slack Application Development 101 Slides
Slack Application Development 101 Slides
praypatel2
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
carlostorres15106
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Padma Pradeep
Recently uploaded
(20)
The transition to renewables in India.pdf
The transition to renewables in India.pdf
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Slack Application Development 101 Slides
Slack Application Development 101 Slides
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
[2021] kotlin - inheritance
1.
Inheritance Kotlin Study Group
#3 Andy Lu 2021.04.08
2.
Who am I Andy
Lu Android Engineer in FutureDial 第二屆 Kotlin 讀書會導讀者 ❤ Kotlin ❤ Flutter Medium: https://medium.com/@andyludeveloper 2
3.
Agenda ● What’s inheritance? ●
When inherited? ● How to inherit? ○ Superclass/Base class ○ Subclass/Derived class ○ Any ● Q&A 3
4.
What’s inheritance? 4
5.
What’s inheritance? 5 Student Class
Teacher Class
6.
What’s inheritance? 6 Student Class
Teacher Class Same properties Same function
7.
What’s inheritance? 7 Superclass/ base
class Subclass/ derived class
8.
What’s inheritance? 8 ● To
avoid duplicate code. ● Override functions and properties. ● Subclass can add own functions or properties.
9.
When inherit? 9
10.
is-a relationship 10
11.
11 ● Student is
a People. ✅ is-a relationship
12.
12 ● Student is
a People. ✅ ● Teacher is a People. ✅ is-a relationship
13.
13 ● Student is
a People. ✅ ● Teacher is a People. ✅ ● Tiger is a People. ❌ is-a relationship
14.
14 ● Student is
a People. ✅ ● Teacher is a People. ✅ ● Tiger is a People. ❌ ● Aircraft is a People. ❌ is-a relationship
15.
How to inherit? 15
16.
16 Superclass/ base class Subclass/
derived class Inheritance tree
17.
Superclass/Base class 17
18.
Class 18
19.
Can not be
inherited 19
20.
Can not be
inherited 20 ��
21.
Superclass 21
22.
Superclass 22 Add open keyword
23.
Can be inherited 23 ��
24.
Subclass/Derived class 24
25.
How to inherit? 25
26.
Inherit a superclass 26
27.
Inherit a superclass 27 :
superclass name (constructor)
28.
Advantage 28 1. Can access
all open functions and properties from superclass. 2. Can override all open functions or properties. 3. Can create own functions or properties.
29.
Access 29
30.
Access 30
31.
Access 31 Hello, my name
is Andy
32.
Not allow to
access 32 private keyword make function non-accessible
33.
Not allow to
access 33
34.
Override 34
35.
Override 35
36.
Override 36 1. Add open
keyword
37.
Override 37 1. Add open
keyword 2. Use override keyword
38.
Override 38 Student Andy say
hi
39.
Create 39
40.
Create 40
41.
Create 41 Andy is doing
home work
42.
Create 42
43.
Thinking 43 ❓
44.
Thinking 44
45.
Any Class 45
46.
Any class 46
47.
Any class 47 ● equals() ●
hashCode() ● toString()
48.
Q & A 48
49.
49 Next Chapter: abstract classes
and interfaces: Serious Polymorphism
Download now