Source: wikibot/has-a

= Has-a
{wiki=Has-a}

"Has-a" is a term often used in object-oriented programming (OOP) to describe a relationship between classes where one class contains or is composed of instances of another class. This indicates a "composition" relationship, where one object (the "whole") is made up of one or more objects (the "parts"). For example, consider the following scenario: - A \`Car\` class "has-a" \`Engine\`.