Polymorphism (GRASP)

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/21

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:09 AM on 7/30/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

22 Terms

1
New cards

Polymorphism (GRASP)

The Polymorphism pattern recommends assigning varying behavior to different subclasses or implementations through polymorphism instead of using conditional logic based on object type.

2
New cards

Behavioral Variation

Behavioral variation is the existence of multiple implementations of the same responsibility, with each implementation providing behavior appropriate to its type.

3
New cards

Type-Specific Behavior

Type-specific behavior is behavior whose implementation depends on the concrete type of an object while sharing a common interface or abstraction.

4
New cards

Common Interface

A common interface defines a shared contract that allows different implementations to be used interchangeably through polymorphism.

5
New cards

Dynamic Dispatch

Dynamic dispatch is the runtime process of selecting the appropriate implementation of a polymorphic operation based on an object's actual type.

6
New cards

Conditional Elimination

Conditional elimination is the replacement of large conditional statements with polymorphic behavior distributed across multiple classes.

7
New cards

Runtime Behavior Selection

Runtime behavior selection is the ability of a software system to choose the correct implementation while the program is executing rather than through explicit conditional logic.

8
New cards

Open Extension

Open extension is the ability to add new behaviors by creating new implementations without modifying existing client code.

9
New cards

Variation Point

A variation point is a location in a software design where multiple implementations of the same responsibility may exist.

10
New cards

Behavioral Substitution

Behavioral substitution is the replacement of one implementation with another while preserving the expected behavior defined by a common abstraction.

11
New cards

Type Checking

Type checking is the practice of selecting behavior by examining an object's concrete type, often using conditional statements.

12
New cards

Conditional Logic Smell

A conditional logic smell is the repeated use of large or growing conditional structures to perform type-specific behavior, indicating that polymorphism may provide a better design.

13
New cards

Replace Conditional with Polymorphism

Replace Conditional with Polymorphism is a refactoring technique that replaces type-based conditional logic with polymorphic implementations.

14
New cards

Behavioral Branching

Behavioral branching is the selection of different behaviors based on an object's characteristics or type.

15
New cards

Extensible Behavior

Extensible behavior is behavior that can be expanded through additional implementations without modifying existing code.

16
New cards

Polymorphic Responsibility

A polymorphic responsibility is a responsibility assigned to multiple implementations through a shared abstraction.

17
New cards

Behavior Delegation

Behavior delegation is the practice of allowing an object to perform behavior by invoking the appropriate polymorphic implementation rather than deciding which behavior to execute itself.

18
New cards

Strategy Candidate

A strategy candidate is a responsibility whose varying implementations suggest that the Strategy design pattern may be appropriate.

19
New cards

Variation Encapsulation

Variation encapsulation is the practice of placing differing behaviors inside separate implementations behind a common abstraction.

20
New cards

Polymorphism Heuristic

The Polymorphism heuristic recommends using polymorphism whenever behavior varies by type and conditional logic would otherwise grow over time.

21
New cards

Polymorphism vs Conditional Logic

Polymorphism distributes varying behavior across multiple implementations, while conditional logic centralizes behavioral decisions within a single component. Polymorphism generally improves extensibility when new variations are expected.

22
New cards

Polymorphism Mindset

The Polymorphism mindset is the habit of asking, "Can this varying behavior become separate implementations instead of another if or switch statement?" before adding new type-based logic.