See the class
class Human{}
class Address{}
class Employee extends Human{
Address address=new Address();
}
Here Employee IS-A Human.
But Employee HAS-A address.
In abject oriented design it is very important to indentify which is IS-A and which is HAS-A relation
No comments:
Post a Comment