Mod 2
Mod 2
Mod 2
Structural Modelling
• A Wall class is responsible for knowing about height, width, and thickness;
• a FraudAgent class, as you might find in a credit card application, is responsible
for processing orders and determining if they are legitimate, suspect, or
fraudulent;
• a TemperatureSensor class is responsible for measuring temperature and raising
an alarm if the temperature reaches a certain point.
• Graphically, responsibilities can be drawn in a separate compartment at the
bottom of the class icon
•
Relationships
• A relationship is a connection among things.
• The three most important relationships are dependencies,
1. Specifications
2. Adornments
3. Common divisions
4. Extensibility mechanisms
Specifications
The UML is more than just a graphical language.
Rather, behind every part of its graphical notation there is a specification that
provides a textual statement of the syntax and semantics of that building
block.
For example, behind a class icon is a specification that provides the full set of
attributes, operations (including their full signatures), and behaviors that the
class embodies; visually, that class icon might only show a small part of this
specification.
A class is an abstraction;
an object is one concrete manifestation of that abstraction.
Elyse (which in its specification is marked as being a kind of Customer object, although it's
not shown explicitly here).
In this figure, there is one component named
spellingwizard.dll that implements two interfaces,
IUnknown and ISpelling.
Extensibility Mechanisms
For example,
if you are working in a programming language, such as Java
or C++, you will often want to model exceptions.
• You can also specify the type, initial value, and changeability of each
attribute.
One customer has one to five bank accounts and one bank
account belongs to one or two customers.
Advanced Relationships
• A relationship is a connection among things.
A type is a stereotype of class used to specify attributes, operations but does not
have methods.
It is generally used in the analysis process to identify the objects for a system.
• UML permits us to place a set of related classes together into a group is called package
• Package is more helpful to organize a large model. Packages are supported by Java.
• Classes in one package cannot access the classes and services in another package