Monday, December 19, 2016

Define the links and a associations .(C++)

 A link is a physical or conceptual connection between object instances. For example ramesh gupta works for karp company. Mathematically, a link is define as a tuple,that is an ordered list of object instances . a Link is an instances of an association,
An association describes a group of Links with common structure and common semantic. For example , a person works – for a company. All the Links in an association connected objects from the same classes.
Association and Links are often appear as verbs in a problem statement.

Association are often implemented in programming languages as pointers from one object to other. A pointer is an attributes in one object that contains an explicit references to another object.
For example , a data structures for person might contain an attribute employer that points to a company objects and a company object might contain an attribute employees that points to a set of employee objects. Implementing association as pointers is perfectly acceptable, but associations should not be modeled this way.



No comments:

Post a Comment