0% found this document useful (0 votes)
193 views10 pages

Advanced Structural Modeling-Compressed

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
193 views10 pages

Advanced Structural Modeling-Compressed

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Advanced Structural Modeling

1. Advanced Classes

• Classifier
• A modeling element that describes structural features (attributes) and behavioral
features (operations).
• A modeling element that can have instances.
• UML classifiers
• Visibility

• Public
• Protected
• Private
• Scope
• Instance

Each instance of the classifier holds its own value for the feature.

• Classifier

There is just one value of the feature for all instances of the classifier.

• Ts&
• netscapeAbstract, Root, Leaf, and Polymorphic Elements
• Abstract class: no instance, unimplemented operation(s)
• Concrete class: has instance(s) and all operations are implemented.
• Abstract operation: no implementation
• Root class: no parent class or super class
• Leaf class: no subclasses
• Leaf operation: cannot be overridden or redefined by subclasses
• Polymorphic operation: can be overridden or redefined by subclasses.
• Multiplicity
• Number of class instances
• Number of elements of an array attribute

• Attribute specification
• Full form

[visibility] name [multiplicity] [:type] [=initial-value] [{property}]

• Standard properties
o changeable
o addOnly: add element(s) only, no remove
o frozen: no value change
• Operation specification
• Full form

[visibility] name [(parameter-list)] [:return-type] [{property}]

• Standard properties
o leaf: cannot be overridden
o isOuery: does not change state
o sequential: semantics of concurrent calls cannot be guaranteed.
o guarded: sequencing and synchronizing concurrent calls
o concurrent: semantics of concurrent calls are guaranteed
• Parameter specification
o Full form
[direction] name : type [=default-value]

o Standard directions
o in: an input parameter with input value, may not be modified
o out: an output parameter, without input value, may be modified
o inout: an input parameter with input value, may be modified
• What is a utility class
• A class with stereotype <<utility>> whose all attributes and operations have classifier
scope (i.e. static).
• Example: <<utility>> Math

1. Advanced Relationship

• Association
• Navigation
• Association (role) visibility
o Public: can be seen outside of the association
o Private: cannot be seen outside of the association
o Protected: can be only seen by subclasses of the association

• Qualification through Qualifier

(bankAccount, accountNumber) → 0 or 1 person

person → many(bankAccount, accountNumber)

• Association class
• Realization
• What

A realization is a semantic relationship between classifiers in which one


(target) classifier specifies a contract that another (source) guarantees to carry
out.

• Where to use
o A class realizes an interface

o A component realizes an interface


o A use-case realization realizes a use case or realization

1. Interfaces

• What is an interface
• An interface is a collection of operations that are used to specify a service of a class or
component.
• An interface does not specify any structure (attributes) nor any implementation of the
operations in the collection.
• An interface defines a line between the specification of what an abstraction does and
the implementation of how that abstraction does it.
• Relationships between interfaces and other classifiers
• A class can realize one or more interfaces
• An interface can be realized by one or more interfaces
• A class can depend on an interface

• Inheritance relationship between interfaces


• Interface for role

1. Packages

• What is a package
• A package is a general-purpose mechanism for organizing elements into groups.
• Owned elements
• A package can own other elements, even other packages.
• Every element is uniquely owned by exactly one package.
• A package forms a name space. Two elements owned by two different packages may
have the same name.

Examples:

BuyerPackage::Information class

SellerPackage::Information class

• Elements of different kinds may have the same name

Example:

BuyerPackage::Information class

BuyerPackage::Information component

• Path names in nested packages

Example:
CustomerPackage::BuyerPackage::Information class

• Visibility of owned elements


o Public (+)
o Private (-)
o Protected (#)

• A package exports all its public elements

• Subsystem – a stereotyped package


• It is a package of elements treated as a unit, including a specification of the behavior
of the entire package contents as a coherent unit.
• A subsystem is modeled both as a package and as a class.
• A subsystem has a set of interfaces that describe its relationship to the rest of the
system

You might also like