Mapa mental
Polymorphism
Conteúdo do mapa
Polymorphism
Ad-Hoc
- Coercion
- Conversion of data types
- Implicit
- Hierarchycal
- Integer to Real
- Hierarchycal
- Explicit
- Casting
- Primitive to Wrapper
- Class to superclass
- Implicit
- Conversion of data types
- Overloading
- Several functions, same name
- int myAdd(int x, int y){....} double myAdd(double x,double y){...}
- Arithmetical operators
- Integer + Integer -> Integer
- Float + Float-> Float
- Integer + Float-> Float
- Calculate length of list with elements of any type
- Several functions, same name
- Coercion
Universal
- Parametric / Genericity
- Type
- public class Entry{ private final K mKey; private final V mValue; public Entry(K k, V v){ mKey = k; mValue = v; }
- Entry elem1 = new Entry<>(3,”Programming”); After declaration is not needed to infer the type in the assignation.
- Represent entries of any type in dictionary
- Function
- public static int lengthA(T[] inputArray){...}
- Calculate length of list with elements of any type
- Type
- Inclusion / Inheritance
- Class B Inherits from Class A:
- Attributes
- Methods
- Redefine
- Use
- One Class
- Java
- Several Classes
- C++
- Class B Inherits from Class A:
- Parametric / Genericity
Informações
- Descrição
- Mapa Mental sobre Polymorphism, criado por Test Mercury em 04-11-2023.
- Criado por
- Test Mercury
- Visualizações
- 0
- Avaliação