Unit-3 Advanced Classes
Unit-3 Advanced Classes
ADVANCED CLASSES,
ADVANCED RELATIONSHIPS,
INTERFACES,
TYPES AND ROLES,
PACKAGES.
ADVANCED STRUCTURAL MODELING
Advanced Classes
Classes - most important building
block of any object-oriented system.
However, classes are just one kind of
an even more general building block
in the UML - classifiers.
Classifiers (and especially classes)
have a
number of advanced features beyond
the simpler properties of attributes and
operations
You can model multiplicity, visibility,
signatures, polymorphism, and other
characteristics.
Fig: Advanced Classes
TERMS AND CONCEPTS
Classifiers
Visibility
Multiplicity
Attributes
Operations
Template Classes
Standard Elements
Classifiers
A classifier is a mechanism that describes structural and behavioral
features.
Classifiers - classes, interfaces, data types, signals, components, nodes,
use cases, and subsystems.
Every instance of a classifier shares the same features definitions,
but each instance has its own value for each attribute
Fig: Classifiers
Visibility
One of the most important details you can specify for a classifier's
attributes and operations is its visibility.
The visibility of a feature specifies whether it can be used by
other classifiers.
UML, you can specify any of four levels of visibility.
(+)public – any outside classifier
(#)Protected- descendant
(-)Private- only classifier itself
(~)Package- same package
Fig: Visibility
Instance and Static Scope
Another important detail you can specify for a classifier's attributes
and operations is its owner scope.
The owner scope of a feature specifies whether the feature appears
in each instance of the classifier has its own distinct values or
whether there is just a single value of the feature shared by all
instances of the classifier.
In UML you can specify two kinds of owner scope.
static
static scope