Mind map
Polymorphism
Map content
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
Information
- Description
- Mind Map on Polymorphism, created by Test Mercury on 04/11/2023.
- Created by
- Test Mercury
- Views
- 0
- Rating