Question

In: Computer Science

Determine the relationships between aggregation, generalization, and association. Explain how each type of association is depicted...

  • Determine the relationships between aggregation, generalization, and association.
  • Explain how each type of association is depicted on a class diagram.
  • Provide an example or examples to support your answer. Please make sure that your example is different from other students.

Solutions

Expert Solution

1.relationships between aggregation, generalization, and association.:

Relationships depict a connection between several things, such as structural, behavioral, or grouping things in the unified modeling language. Since it is termed as a link,

it demonstrates how things are interrelated to each other at the time of system execution.

Association:

Association is a structural relationship that represents how two entities are linked or connected to each other within a system.

It can form several types of associations, such as one-to-one, one-to-many, many-to-one, and many-to-many.

A ternary association is one that constitutes three links. It portrays the static relationship between the entities of two classes.

An association can be categorized into four types of associations, i.e., bi-directional, unidirectional, aggregation and composition

aggregation is a special form of association and composition is a special form of aggregation.

Aggregation:

An aggregation is a special form of association.

It forms a binary relationship, which means it cannot include more than two classes.

It is also known as Has-a relationship.

There is no Logical relationship between two classes but we have to accses the some properties of parent class then we implement the Has-a relationship.

It specifies the direction of an object contained in another object.

Generalization:

In Aggregation There is no Logical relationship between two classes In Generalization It having the logical relationshp we Represent In is-a relationship.

It exists between two objects (things or entities), such that one entity is a parent (superclass or base class), and the other one is a child (subclass or derived class).

These are represented in terms of inheritance.

child class can access, update, or inherit the functionality, structure, and behavior of the parent.

2 .

Classes:

A class diagram contains a rectangle for each class. It is divided into three parts.

  1. The name of the class.
  2. The names and types of the fields.
  3. The names, return types, and parameters of the methods.

For example, a Person class and a Book class might be modeled like this.

This indicates that a Person object has private fields named name and birthDate, and that it has public methods named getName, setName and isBirthday. A Book object has private fields named title and authors. A Book object also has public methods named getTitle, getAuthors and addAuthor.

There are four type of Association:

Bi-directional

Unidirectional

aggregation

Reflexive

1 Bi-directional:

It having the many-to-many relationship. when multiple records in a table are associated with multiple records in another table.

Two objects might store each other in fields

two objects are related but only one object know about the relation.

For example

Person object listing all the books that the person owns and Book object might list all the people that own it.

2.Unidirectional:

In a unidirectional association, two classes are related, but only one class knows that the relationship exists.

A unidirectional association is drawn as a solid line with an open arrowhead pointing to the known class.

3.Aggregation:

Aggregation is a subset of association, is a collection of different things.

It represents has a relationship. It is more specific than an association.

It describes a part-whole or part-of relationship. It is a binary association, i.e., it only involves two classes. It is a kind of relationship in which the child is independent of its parent.  

For example: Person object has/owns the Book object while the book is not really part of the person,

mean  If the Person object gets destroyed still the Book object can work independently

Reflexive Association:

This occurs when a class may have multiple functions or responsibilities.

For example, a staff member working in an airport may be a pilot, aviation engineer, a ticket dispatcher, a guard, or a maintenance crew member. If the maintenance crew member is managed by the aviation engineer there could be a managed by relationship in two instances of the same class.


Related Solutions

What is enhanced ER Model? Explain extended ER features: Specialization, Generalization and Aggregation with your clear...
What is enhanced ER Model? Explain extended ER features: Specialization, Generalization and Aggregation with your clear definitions/ideas/differences in your own words and give at least one appropriate example for each one of them.
Determine the type of interspecific interactions depicted by the examples below. Mutualism, Competition or Exploitation. Each...
Determine the type of interspecific interactions depicted by the examples below. Mutualism, Competition or Exploitation. Each each of the given interactions, indicate which organism benefits (+) and which is harmed (-)? A) Plant roots and fungus living symbiotically: _________________________________ B) Lice in a child’s hair: ______________________________________________ C) Vultures and hyenas in a savanna ___________________________________ D) Microbiota living in a human gut: ____________________________________ E) A caterpillar and a tree: _______________________________________________
7)Differences – explain 3 differences between C.C. and O.C. a.The association learned in each type of...
7)Differences – explain 3 differences between C.C. and O.C. a.The association learned in each type of conditioning b.Involuntary vs. voluntary learning c.The sequence of stimulus and behavior
what are the main differences between symbiotic relationships of rhizobium and mycorrhizal association with plan?
what are the main differences between symbiotic relationships of rhizobium and mycorrhizal association with plan?
The director of an alumni association wants to determine whether there is any type of relationship...
The director of an alumni association wants to determine whether there is any type of relationship between the amount of an alumni's contribution (in dollars) and the number of years the alumnus has been out of school. Based on the data below, compute the value of the correlation coefficient between the number of years and the amount of the contribution. Years x 1 3 4 10 9 7 Contribution y 630 180 210 30 90 90
Explain the term semiautonomous and the developmental relationships between the various plastid types – “how they...
Explain the term semiautonomous and the developmental relationships between the various plastid types – “how they are formed, what stimulates their formation”.
Discuss the difference between diversifiable risk and market risk, and explain how each type of risk...
Discuss the difference between diversifiable risk and market risk, and explain how each type of risk affects well-diversified investors.
Explain how default is measured - and then depicted to investors - on the Street? What...
Explain how default is measured - and then depicted to investors - on the Street? What are five determinants of bond safety? What is a CDO?
1. Explain platelet aggregation studies with an aggregometer to include how the test is performed, the...
1. Explain platelet aggregation studies with an aggregometer to include how the test is performed, the use of aggregating agents and how it used in disease diagnosis.   yes, related to aggregation testing(lab tests)
3.Explain the term semiautonomous and the developmental relationships between the various plastid types – “how they...
3.Explain the term semiautonomous and the developmental relationships between the various plastid types – “how they are formed, what stimulates their formation”. 4.Compare and contrast between the general products and substrates of photosynthesis and respiration.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT