Polymorphism

Nik Nguyen
Mind Map by Nik Nguyen, updated more than 1 year ago
Nik Nguyen
Created by Nik Nguyen over 4 years ago
28
0

Description

Small mindmap on polymorphism.
Tags

Resource summary

Polymorphism
1 is meant to make changes in the method definition of the derived classes, and have those changes apply to methods written in the base class
2 Example:

Annotations:

  • people[0] = new Undergraduate("Cotty, Manny", 4910, 1); people[1] = new Undergraduate("Kick, Anita", 9931, 2); people[2] = new Student("DeBanque, Robin", 8812); people[3] = new Undergraduate("Bugg, June", 9901, 4);    
2.1 people[0] = new Undergraduate("Cotty, Manny", 4910, 1); people[1] = new Undergraduate("Kick, Anita", 9931, 2); people[2] = new Student("DeBanque, Robin", 8812); people[3] = new Undergraduate("Bugg, June", 9901, 4);
2.1.1 Say we ran the writeOutput() method on each of these. Which writeOutput is used?
2.1.1.1 The one in the class that was USED TO CREATE THE OBJECT.
2.1.1.1.1 Not necessarily "person", but "Undergraduate" and "Student."
2.1.1.1.1.1 THIS IS A FORM OF DYNAMIC BINDING!
2.2 THERES A WHOLE PROJECT BASED ON EXAMPLES FOR POLYMORPHISM!
Show full summary Hide full summary

Similar

Missed Questions on Inheritance/Polymorphism Test
Nik Nguyen
Abstract Classes & Interfaces & Polymorphism
Nik Nguyen
NEW: ExamTime's Mind Map Maker
Andrea Leyden
NEW: ExamTime's Mind Map Maker
Daniel Muñiz
How to Create A Mindmap
PatrickNoonan
Creating Mind Maps with GoConqr
Sarah Egan
NEW: ExamTime's Mind Map Maker
Daniel Muñiz
Macbeth Quotes/Themes
Michael LEwis
Genes, The Genetic Code, DNA and Chromosomes
Bee Brittain
How Villainy is Depicted in Macbeth
scarletsnow491
CUBAN MISSILE CRISIS
Olivia Andrews