So let's start with the dependency example. A dependency,
as we said, expresses the relationship between a supplier
and a client that relies on it. There is
a dependency because changes in the supplier can affect the
client. Here in this example I am showing that
a dependency example involving the registration manager and the
scheduling algorithm. As you can see the, the dependency
is indicated with a dashed line pointing from the client
to the supplier. And here it's pretty clear why
the RegistrationManager is dependent on the Scheduling Algorithm. It's
because the RegistrationManager uses this Scheduling Algorithm. And therefore,
if the Scheduling Algorithm changes, the RegistrationManager might be
affected by that change. Another less obvious example is
the dependency between the Registration Manager and the Student.
In this case, because the Registration Manager gets a
Student object as a parameter here there is a dependency
between the two. Again, if the Student class were to change the Registration
Manager might be affected because it's relying on the Student for it's behavior.