Is-A relationship: Whenever one class inherits another class, it is called an IS-A relationship. Has-A relationship: Whenever an instance of one class is used in another class, it is called HAS-A relationship.1 Ara 2021
Is a and has a relationship?
Is-A relationship: Whenever one class inherits another class, it is called an IS-A relationship. Has-A relationship: Whenever an instance of one class is used in another class, it is called HAS-A relationship.1 Ara 2021
Leave a Reply
Is 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.