And that's exactly what we're going to look at next,
relationships in the class diagram, how they're represented and
what they mean. First of all relationships as the
name says, describe interactions between classes or between objects in
my system. And we will describe three main types
of relationships. The first one is called a Dependency
relationship. And we can express that as X uses
Y and we represent it with a dashed directed line.
So when we have such a line between two classes
that means that the first class uses the second one. And
we're going to provide an example of a dependency in a
minute. The second type of relationship is an association that can
also be an aggregation. We'll see what the distinction is.
But basically, what this means is that we can express that
as a X has a y. So x contains a
y. And if it is in association, we indicate it with
a solid undirected line. If it's an aggregation,
we indicate it in the same way, but with
a diamond at one of the ends. Finally, the
third type of relationship is what is called Generalization.
And this can be expressed as x is a
y. So this is the relationship that expresses inheritance.
Specialization between two classes. It's represented with a solid
directed line with a large open arrow head at
the end. Going from the more specialized class to
the less specialized class. So going from the subclass to
the super class. So now let's look at each relationship
in more detail using our example, our course management system.