If your class inherits from the other class, it is an “IS-A” relationship. If the class is passed to the other class in the constructor this is a “HAS-A” relationship.
Read moreWhat are the relationships used in UML?
Type of UML Relationship are Association, Dependency , Generalization , and Realization .22 Oca 2022
Read moreIs a and has-a relationship?
An IS-A relationship is inheritance . The classes which inherit are known as sub classes or child classes. On the other hand, HAS-A relationship is composition. In OOP, IS-A relationship is completely inheritance.
Read more