Notes
Outline
Introduction to UML I
Jagdish Gangolly
State University of New York at Albany
Introduction to UML I
Basic Concepts and Strategies
Why model?
Building blocks of UML
Basic Concepts and Strategies
Abstraction
Formality
Divide & Conquer
Hierarchical ordering
Cohesion & Coupling
Information hiding
Conceptual integrity
Completeness
Logical independence
Correctness & efficiency
Why model?
To visualize a system as is or as we want it to be
To specify the structure and behavior of the system
To provide a template to guide the construction of the system
To document the decisions made
Building blocks of UML
Things
Relationships
Model of Systems Architecture
Hello World!
Things - Structural
Class: a set of objects [rectangle]
Interface: collection of operations specifying s service [circle]
Collaboration: elements working together to provide cooperative behavior [broken ellipse]]
Use Case: a snapshot of one aspect of the system (realized by a collaboration) [ellipse]
Active Class: a class that owns one or more processes or threads [heavy rectangle]
Component: physical and replaceable part of a system (realises a set of interfaces) [tabbed rectangle]
Node: a physical element that exists at runtime and represents a computational resource [cube]
Things – Behavioral, Grouping,Annotational
Behavioral things
Interaction: set of messages exchanged
State machine: model of behavior of a class or collaboration. Includes states, transitions, events, activities. [rounded rectangle]
Grouping things
Packages: [tabbed folder]
Annotational things: explanatory notes [dog-eared rectangle]
Relationships
Dependency [broken arrow]
Association [solid line]
Aggregation [solid line with a hollow diamond at the Aggregation end]
Composition [solid line with a black diamond at the aggregation end]
Generalisation [solid line with a hollow arrowhead pointing to the parent]
Realisation [broken line with a hollow arrowhead]
Model of Systems Architecture
Hello World! – The Program
The Program:
Import jawa.awt.Graphics;
Class HelloWorld extends java.applet.Applet{
public void paint (Graphics g) {
g.drawString(Hello, World!”, 10,10);
}
}
Hello World! – Key Abstractions
Slide 12
Slide 13
Slide 14