When we have a “has a” relationship between classes, we instantiate an instance of the dependent object. Once created, we pass it as an argument of the main class constructor. In our sample code below. Widget “has a” relationship