What are the differences between instance specification and object

In UML, there are two related concepts:

  • instance specification
  • an object

What is the difference between instance specification and object?

+7
source share
2 answers
  • In most cases, thinking about an instance and an object is the same thing. If you are really interested in the difference between them, then ...

  • We need to first find out the relationship between the "class" and the classifier, the first is concrete, the last is abstract.

    UML2.5 / 11 Structured Classifiers / Classes A class is a concrete implementation of EncapsulatedClassifier and BehavioredClassifier. The purpose of the class is to determine the classification of objects and indicate functions that characterize the structure and behavior of these objects.

  • I would say that an object is an instance of a class; InstanceSpecification is an instance of the classifier. Quoted from UML 2.5

    The InstanceSpecification specification may represent: Classification of an instance by one or more classifiers. If only the specified classifier is abstract, then the InstanceSpecification instance only partially describes the instance.

  • "object" is not really a UML concept, InstanceSpecification is a more abstract concept, and all its semantics apply to the "object".

Hope this helps.

+6
source

An instance specification is a concept used to model internal UML elements.

The UML user does not have to worry about this. CASE tool developers, on the other hand, know this concept because they need it to make the syntax rules of the language apply to their tools.

An object is a concept that is more OO than UML itself. An object is an instance of a class.

+1
source

All Articles