 |
has_a: Properties VS possessions
As I was working on an implementation for exercise 3 tonight, I realized that there is a difference between has_a in the sense of a property VS has_a in terms of a "possession".
Example of a property:
Example of a possession:
Where this difference comes into play is in the implementation of the HasA function, and can be highlighted by the following:
Test case 1:
Daniel has_a human_body human_body has_a human_head human_head has_a nose |
|
The property Daniel.nose makes sense because each of the above has_a relationships describe properties, or parts.
Test case 2:
Daniel has_a dog dog has_a tail |
|
The property Daniel.tail doesn't make sense because the relationship Daniel has_a dog is describing dog as a possession of Daniel, rather than as a property. |
|
 |