Advanced Class Modeling
Advanced Class Modeling
Enumerations
It is a data type that has a finite set
of values.
It is significant for an
implementation; as you may display
the possible values with a pick list
and you must restrict data to the
legitimate values.
Multiplicity
Multiplicity of an attribute specifies
the number of possible values for
each instantiation of an attribute.
If multiplicity is not specified, an
attribute is assumed to be a
mandatory single value
Scope
The scope indicates if a feature
applies to an object or a class
An underline distinguishes features
with class scope from those with
object scope
UML convention is to list attributes
and operations with class scope at
the top of the attribute and operation
boxes, respectively.
Visibility
It refers to ability of a method to reference a
feature from another class and has the possible
values of public, protected, private and package.
Any method can freely access public features
Only methods of the containing class and its
descendants via inheritance can access
protected features.
Only methods of the containing class can access
private features.
Methods or classes defined in same package as a
target class can access package features
Association ends
An
N-ary association
Associations among three or more
classes is called as n-ary association
Aggregation
Aggregation is a strong form of
association
Aggregation versus
association
If two objects are tightly bound by a
part-whole relationship, it is an
aggregation
If the two objects are usually
considered as independent, even
though they may often be linked, it is
an association
Composition
The UML has two forms of part-whole
relationships: a general form called
aggregation and
a more restrictive form called composition
Propagation of operations
Propagation (also called triggering) is
the automatic application of an
operation to a network of objects
when the operation is applied to
some starting object