50 likes | 220 Views
Summary of the lecture. We introduced the instantiation dependency This is a binary relationship (a relationship between two classes). It is directional, from a source class to a target class
E N D
Summary of the lecture • We introduced the instantiation dependency • This is a binary relationship (a relationship between two classes). • It is directional, from a source class to a target class • Only the definition of the source class is affected by the presence of the relationship (this is how we define the source class in a relationship in general) • Example is on next two slides of an instantiation dependency between classes A (source) and B (target)
class A – the source class package pkg; public class A { public A() { new B(); } }
class B – the target class package pkg; public class B { public B() { } }