+ 1

Benefits of Inheritance?

9th Jan 2017, 12:00 PM
Deep chand
Deep chand - avatar
6 Respuestas
+ 2
Code reuse. Encapsulation. Polymorphism. Common (base) API, which is essentially polymorphism
9th Jan 2017, 12:08 PM
Leon
Leon - avatar
+ 2
@Deep polymorphism requires inheritance, if you need to learn about polymorphism that's another question. Encapsulation is just data hiding; the super class hides implementation as a service to the sub class.
9th Jan 2017, 12:16 PM
Leon
Leon - avatar
+ 1
@Dean How Encapsulation and polymorphism is involved in Inheritance?
9th Jan 2017, 12:14 PM
Deep chand
Deep chand - avatar
+ 1
@Ali What do you mean by "your program find arrangement"?
9th Jan 2017, 12:15 PM
Deep chand
Deep chand - avatar
0
you don't need to rewrite the method and attribute in child class and your program find arrangement..
9th Jan 2017, 12:08 PM
Ali Akbar Moeini
Ali Akbar Moeini - avatar
0
@Deep it means your program can be a sample of nature with discipline..
9th Jan 2017, 12:21 PM
Ali Akbar Moeini
Ali Akbar Moeini - avatar