has

Australia's #1 for Law
Join 150,000 Australians every month. Ask a question, respond to a question and better understand the law today!
FREE - Join Now
In database design, object-oriented programming and design (see object oriented program architecture), has-a (has_a or has a) is a composition relationship where one object (often called the constituted object, or part/constituent/member object) "belongs to" (is part or member of) another object (called the composite type), and behaves according to the rules of ownership. In simple words, has-a relationship in an object is called a member field of an object. Multiple has-a relationships will combine to form a possessive hierarchy.
This is to be contrasted with an is-a (is_a or is a) relationship which constitutes a taxonomic hierarchy (subtyping).
The decision whether the most logical relationship for an object and its subordinate is not always clearly has-a or is-a. Confusion over such decisions have necessitated the creation of these metalinguistic terms. A good example of the has-a relationship is containers in the C++ STL.
To summarize the relations, we have

hypernym-hyponym (supertype-subtype) relations between types (classes) defining a taxonomic hierarchy, where
for an inheritance relation: a hyponym (subtype, subclass) has a type-of (is-a) relationship with its hypernym (supertype, superclass);
holonym-meronym (whole/entity/container-part/constituent/member) relations between types (classes) defining a possessive hierarchy, where
for an aggregation (i.e. without ownership) relation:
a holonym (whole) has a has-a relationship with its meronym (part),
for a composition (i.e. with ownership) relation:
a meronym (constituent) has a part-of relationship with its holonym (entity),
for a containment relation:
a meronym (member) has a member-of relationship with its holonym (container);
concept-object (type-token) relations between types (classes) and objects (instances), where
a token (object) has an instance-of relationship with its type (class).

View More On Wikipedia.org
  1. J

    VIC my son has worked in the same place for approx. 16 years. he is still classified as an casual worker no overtime rates no meal allowance in fact no

    penalties apply .he has to work overtime and now has come to a call in on a need basis and is told to go home when their is no work and after that than be called back to work not one penalty .no travel allowance .he is working for an essential service and I find these conditions hard to believe .
  2. J

    NSW Child custody issue

    My son has been separated from his wife for 4 years. To date they have agreed to split the caring of their two children (aged 14 an 11) 50/50 and this has worked. There are no court child custody orders in place. Recently she has moved location and threatened to have the children 100% of the...
  3. C

    QLD Has he been mislead? Cross examination scheme

    Hi My partner has self represented in Court for the last 2 years. At my partners last hearing, he was advised by the Judge that he may be eligible to apply for the Commonwealth Family Violence and Cross-Examination of Parties Scheme as his ex had put 2 x DVO's on him, plus he has been charged...
  4. J

    WA Fiancé is getting extorted

    So I fiancés exes Mother contacted him last year when she found out he was in a frail state of mind and has started demanding money. She is stating that he owes her daughter $10,000 for a holiday. However he paid for one holiday himself, and they essentially split the cost of another. In no way...
  5. K

    NSW Commercial property neighbour has camera on my 16 year old daughter and I

    Hello I currently have a commercial lease for my business. My daughter often comes to my work after school and will sometimes do a workout or play with our dog in our car park area or at the front of our unit. My concern is that the guy next door has always been quite rude and has had times...