Más contenido relacionado
Similar a 7 inheritance and polymorphism (20)
7 inheritance and polymorphism
- 4. Purpose of Inheritance
reuse common methods and attributes among classes without
recreating them
Generalization
Specialization
Extension
- 7. based
access the variables and methods of the base class from the derived
class
cannot use for invoking the static method
- 8. new
hide the methods or variables of the base class
https://gist.github.com/2358859
- 11. Method Overriding
allows the derived class to override or redefine the methods of the
base class.
- 13. Question?
https://gist.github.com/2366263
- 14. Question?
https://gist.github.com/2366821
- 16. Sealed
prevent inheritance
https://gist.github.com/2366688