4 resultados para inheritance

em University of Southampton, United Kingdom


Relevância:

10.00% 10.00%

Publicador:

Resumo:

Inheritance Code duplication Super classes Constructors Polymorphic collections “Anywhere a super class is, a sub class can go” Casting A great deception

Relevância:

10.00% 10.00%

Publicador:

Resumo:

In this session we introduce inheritance - one of the cornerstone concepts of object oriented programming. We look at how to define super and sub-classes, how to maintain encapsulation using the super() constructor, and why it is useful to use substitution to hold references to sub-classes in references typed as their super-class.

Relevância:

10.00% 10.00%

Publicador:

Resumo:

In this session we build on inheritance and look at overriding methods and dynamic binding. Together these give us Polymorphism - the third pillar of Object Oriented Programming - and a very powerful feature that allows us to build methods that deal with superclasses, but whose calls get redirected when we pass in sub-classes.

Relevância:

10.00% 10.00%

Publicador:

Resumo:

In this session we look at how to use Abstract Classes and Interfaces in Object Oriented Design - especially as a way to get all the advantages of multiple inheritance without any of the problems.