Module 9 Flashcards
(11 cards)
The practice of using existing code to develop new applications.
It is a fundamental principle of software engineering that allows developers to save time and effort by leveraging existing code libraries, frameworks, and modules.
Code reuse
A mechanism that allows a class to inherit properties and methods from another class.
Inheritance
A mechanism that allows a class to contain instances of other classes as members.
Composition
A mechanism that allows a class to delegate responsibility for a task to another class. In this approach, a class delegates the implementation of a method to another object that is responsible for providing the implementation. This enables the class to reuse the functionality of the delegate object without having to implement it itself.
Delegation
A mechanism that allows a class to keep responsibility for a task to another class.
Delegation
A term used to describe the relationship between two classes, where one class is a specialized version of the other.
“is-a” relationship/Inheritance
A type of relationship between classes, which is used to define the ownership of one object by another object.
Has-A-Relation
A strong form of the Has-A-Relation, where one class owns the other class and is responsible for its lifetime.
If the owner class is destroyed, then the owned class is also destroyed.
Represents a “whole-part” or “containment” relationship between two classes, where one class is composed of one or more objects of another class.
Composition
is a type of relationship between classes, which is used to define the ownership of one object by another object.
This relationship is also known as composition or aggregation.
Has-A-Relation
A type of relationship between two classes where one class, the aggregate class, has a reference to the other class, the part class.
Aggregation
A mechanism that allows a class to delegate responsibility for a task to another class.
Delegation