+ 6
Difference between identity, attribute and behavior? Explain it with the help of any real object.
3 Réponses
+ 8
imagine a group of people.identity is the name and title like john or tom.attribute is what is the staff like and its details.for example john is young and dignified.behavior is what is its job and what does it works. for example john is a programmer and he codes.good luck!
0
object is like a tree! may have roots, branches, leaves, flower or fruits as it's sub objects or classes. it's seed is an attribute for it and growing as tree is it's behaviour ☺
0
Here class SomeClass{...}; This is an object of the SomeClass type SomeClass object; The object is intented to do smth useful: object.doSmth(); The object has its attribute. tAttribute attribute =object.getAttribute(); The set of attribute values is object current state.