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/AVvXsEgorZe6OO_6dXFkR_Bjlta-Fq2KWnZzDVooqBqFp3dNJcbsLYdgMGbFHtG1tBjYjy8HiGb99tJthruVL255prTeGsMxbwRzvWfsHljNC4DgK-3DrQHjL_viGPXoENrZyTti2ncM87xNqL2F/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/AVvXsEg7xvf2xxlu5YOVdZax7oYlFqzS0CgAnh4tXXPJ1AzeEe8u4e1k7qAUw0pyTK3ZuujHIAam_f_f-ZDHmZ-oquiwX2S0111r_boKfPeLyCLxwmP_I5urrk8oGeu2lQLKCaw0Q07ZyuuYf-Tg/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/AVvXsEhsdnw1kaN6VAfbncLl8r1EFeZcHc5bHn7clL2nMZRlnT8w8KubydYa8-hL8Q9B7gB8cDNAkvhpta4r2q5LLKYT0TXQffdPOLzjci5G6z-I0oV70a5zT3Fsf4sAvTfVlwtne5EXWCcCdBaE/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/AVvXsEgV3TQC6aKzO9G44qzqZVoYSSJBccGWpq_JWtPNv-5ATvoKfnkrlPyjCINm56-tJVc6QIHzBgvmtCw4gE6o2L4hR_3u-rtQRr-6XkzuUsv-cvWIdr_Ef6K7f0Q_Yt6rwiwcCfEnTFuV3XHT/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/AVvXsEjHniAnX_JigzZHGiyxwX3kdd6cd2zElep_RYE4mPlHlE8ZC4X-e9iRQAub-_Vu8yrBLkQz1G3MzIWlPJ3RwLn544IR6bzdBi9PVADXDPZJh6g7kuwuBHOuyht-T7nJ3fTTJaypjhQ4E9EP/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
Post a Comment
Post a Comment