Associations & Dependencies in Object-Oriented Programming

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/12

flashcard set

Earn XP

Description and Tags

These flashcards cover key vocabulary and concepts regarding class relationships, associations, and dependencies in object-oriented programming.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

13 Terms

1
New cards

Class Relationships

Interactions between classes in object-oriented programming that define how objects communicate or depend on each other.

2
New cards

Inheritance

A relationship where one class (child/subclass) inherits properties and behaviors from another (parent/superclass).

3
New cards

Association

A relationship between two classes where one class uses the functionality or data of another, defined as a 'has-a' relationship.

4
New cards

Navigability

The ability of one class to 'see' or access another class in an association.

5
New cards

Multiplicity

Specifies how many objects of one class can be associated with another in a relationship.

6
New cards

Unidirectional Association

A relationship where one class is aware of and interacts with another, but the reverse is not true.

7
New cards

Bidirectional Association

A relationship where both classes can access each other.

8
New cards

Aggregation

A special form of association representing a 'whole-part' relationship where one class owns another but both can exist independently.

9
New cards

Composition

A stronger form of aggregation where if the whole is destroyed, the parts also cease to exist.

10
New cards

Dependency

A temporary interaction where one class relies on another class briefly, typically within a method.

11
New cards

Circular Dependency

Occurs when two or more classes depend on each other, making the code harder to understand and maintain.

12
New cards

Best Practices for Dependencies

Include using dependency injection, minimizing dependencies, and avoiding retaining unnecessary references.

13
New cards

Overuse of Bidirectional Associations

Can lead to a high degree of coupling between classes, making the system harder to maintain.