Advanced Classes
|
Classifiers:
A classifier is a mechanism that describes structural and behavioral features
In general, the modeling elements that can have instances are called classifiers
Class, Instance, Component, Node, Use case, Subsystem are classifiers
![Classifiers cse study zone,estudies4you,ADVANCED STRUCTURAL MODELING in ooad,ADVANCED STRUCTURAL MODELING in uml,uml ADVANCED STRUCTURAL MODELING,ooad ADVANCED STRUCTURAL MODELING,](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_zU2Z9Se5s0pCLESAPbGC3w2FgK0dc1z6oA42wCKP_JuHyrSMpPIthUAl7ZfHNX-WoBmKfewvPtlLFBOWP-AIro3VgdvGssVzEkyUu2M2jWUczctICoBk6V1hhiA7Vj6-RPGbjCcvNYWN/s1600/ADVANCED+STRUCTURAL+MODELING.jpg)
Class: A set of attributes, operations, relationships and semantics
Use case: Set of a sequence of actions, including variants, that a system performs that yields an observable result or value to a particular actor
Datatype: A type whose values have no identity, including primitive built-in types (such as numbers anti strings), as well as enumeration types (such as Boolean)
Component: Physical and replaceable part of a system that conforms to and provides the realization of a set of interfaces
Node: A physical element that exists at run time and that represents a computational resource, generally having at least some memory anti often processing capability
Subsystem: Grouping of elements of which some constitute a specification of the behavior offered by the other contained elements
Visibility:
Public [+]: All outside classifiers that have visibility to the given classifier, can use this feature
Protected [#]: All descendants of the classifier can use the feature
Private [-]: The classifier alone can use the feature
![Visibility cse study zone,estudies4you,ADVANCED STRUCTURAL MODELING in ooad,ADVANCED STRUCTURAL MODELING in uml,uml ADVANCED STRUCTURAL MODELING,ooad ADVANCED STRUCTURAL MODELING,](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg14rZfO1nN4_OnOYJZC86UzKNHsbecvSKYPpVFUkB582lo9fXvrBsw1Gv5oDJYpVrKvBmsZHRQFWnZYo6FldOhrPHiB6Xb-ohBar1xmOHAt08ZD88zv0TRk2v5F6OUbl3PBa8Ndq7fsEcB/s1600/ADVANCED+STRUCTURAL+MODELING.jpg)
Scope:
The owner scope of a feature specifies whether the feature appears in each instance of the classifier or whether there is just a single instance of feature for all instances of the classifier.
- Instance: Each instance holds its own value
- Classifier: Just one value for all instances (static)
![Scope cse study zone,estudies4you,ADVANCED STRUCTURAL MODELING in ooad,ADVANCED STRUCTURAL MODELING in uml,uml ADVANCED STRUCTURAL MODELING,ooad ADVANCED STRUCTURAL MODELING,](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHpMnwic6j_qnOjPydO11uXil1-M7U9LRUxGr4zT5FYNEXcfcVrigHWs1e3TyuLwYo7WvTuii4GxWCQp409V52ugn1i5mJfkJV31Vwr5yxlzvlB4PsjsTbKsUMCYyh4n6mGwByolMgWLC3/s1600/ADVANCED+STRUCTURAL+MODELING.jpg)
Multiplicity:
Typically, there may be any number of instances of classes
The number of instances a class may have is called multiplicity
![Multiplicity cse study zone,estudies4you,ADVANCED STRUCTURAL MODELING in ooad,ADVANCED STRUCTURAL MODELING in uml,uml ADVANCED STRUCTURAL MODELING,ooad ADVANCED STRUCTURAL MODELING,](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilhYee18FI8G-Tx_AecMfrlY19lOytwJUtZPvSupfphRpuM2uJsh2yMDa3Gae3vSQ4jkkZ_4bYGhxwxzHwAk7aO69LIE2McQgHN4nrKn0XC9MDCPPy6kEMBOtLwEzpyWANHLAl5lR_zjlT/s1600/ADVANCED+STRUCTURAL+MODELING.jpg)
Attributes:
The syntax of an attribute in the UML is:
[visibility] name [multiplicity] [: type] [=initial-value] [{property-string}]
There are three defined properties:
- Changeable: There are no limitations on modifying the value of the attribute
- AddOnly: Additional value may be added for attributes that have a multiplicity > 1. Existing value may not be altered or removed
- Frozen: The value of attribute may not be altered after an object is initialized
Operations:
- The syntax of an operation in UML is
- [visibility] name [(parameter-list)] [: return-type] [{property-string}] [direction] name: type [=default-value]
- There are five defined properties:
Leaf: May not be overridden
isQuery: Leave the state of subsystem unchanged
Sequential: Only one flow is in the object at a time
Guarded: Sequentializing all calls
Concurrent: Treating the operation as atomic
|
Template Classes:
![Template Classes cse study zone,estudies4you,ADVANCED STRUCTURAL MODELING in ooad,ADVANCED STRUCTURAL MODELING in uml,uml ADVANCED STRUCTURAL MODELING,ooad ADVANCED STRUCTURAL MODELING,](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjojRZhQutIZpmVu7hipoEzJ7j-_Ha9vGhqOm5RuFTA2f2vBfBJ_0SUyANdkgqYlZOTJy5fuPmVRmtw2c5FuGPl7Ysc8nwoJ_6F0vMG4YYyESirLGzfaFgj4RitNKIGd-6xzCijVAinDhzQ/s1600/ADVANCED+STRUCTURAL+MODELING.jpg)
- These are similar to the template classes in C++ and Ada
- Cannot use a template directly; first it should be instantiated
Standard Elements:
The standard stereotypes that apply to classes are:
- Metaclass: A classifier whose objects are all classes
- Powertype: A classifier whose objects are classes, which are the children of a given parent class
- Stereotypes: A stereotype that may be applied to other elements
- Utility: A class whose attributes and operations are all static scoped so that the clients of utility may not necessarily create instances to use the operations and attributes