cs2340: UML and Class Diagrams - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

cs2340: UML and Class Diagrams

Description:

UML Class Diagram Syntax. 2. Tutoring For CS 2340. Not understanding the concepts? ... diagram shows: Packages (sub-packages of our package diagram) Classes ... – PowerPoint PPT presentation

Number of Views:138
Avg rating:3.0/5.0
Slides: 24
Provided by: joche1
Category:

less

Transcript and Presenter's Notes

Title: cs2340: UML and Class Diagrams


1
cs2340 UML and Class Diagrams
  • Spring 2007

2
Tutoring For CS 2340
  • Not understanding the concepts?
  • Not making the grades expected or wanted?
  • CoC has free tutoring available.
  • Utilize this opportunity to improve your
    knowledge and your grades.
  • Contact Margaret Clayton mclayton_at_cc.gatech.edu
  • Set up an appointment now!

3
Unified Modeling Language
  • Three Amigos Booch, Rumbaugh (OMT), Jacobson
    (OOSE)
  • OMG Standard
  • CASE Tool Support (Rational Rose)
  • For this class Version 2.0
  • OCL Formal Specifications

4
Model and View Diagrams
Implementation View
Class Diagram Object Diagram
Composite Structure Diagrams
User View Use Case Diagrams
Structural View
Component Diagrams
Communication Diagram Collaboration Diagram State
Diagram Activity Diagram Timing Diagram
Deployment Diagram
Behavioral View
Environment View
5
Why so many diagrams?
Different stakeholders
Different concerns
Why not just one blueprint for a skyscraper?
6
Package Diagrams
  • Show basic package structure
  • represents packages or namespaces
  • Each classname in a package must be unique
  • Show dependencies between packages
  • Something in a package uses something in another
    package
  • Typically a class in one package calls methods in
    another class.

7
Packages
A dependency
ServerServer
A Fully-Qualified Name
A package
8
Simple Package Diagram
Well-structured is acyclic
9
Class Diagrams
  • A class diagram shows
  • Packages (sub-packages of our package diagram)
  • Classes
  • Attributes
  • Methods
  • Interfaces
  • Collaborations
  • Dependency, Generalization, Relationships
  • A class diagram is a STATIC view of system

10
Three Levels of Class Diagrams
  • Conceptual (Domain) Model
  • Analysis (Specification)
  • Implementation

11
Basic Class Diagrams
12
Basic Class Diagrams
public protected - private package /
derived
Abstract abstract
constructor query update
Class Scope (static)
Formats for boxes Visibility Attribute_Name
MultiplicityType Initial_Value
property-string Visibility Method_Name
(Parameter_List) Return-List
property-string kind param_Name type
default value , where kind in,
out , inout and surround optional items
13
Basic Class Diagrams
Superclass
Class with parts
Note
Assembly Class
Subclass
Composition (Aggregation) (part-of, has-a)
Association (relationship)
Inheritance (Generalization) (is-a, kind-of)
14
Basic Class Diagram (Example)
15
Basic Class Diagram (Example)
16
Class Diagrams (Advanced)
Cardinality (Multiplicity) 1 0..1 0.. 1..
64 2..5 2,4,10
takes
0..
17
Class Diagrams (Advanced)
Important Stereotypes ltltinterfacegtgt specify
collection of operations to specify
services ltlttypegtgt specify structure and
behavior (not implementation) ltltenumerationgtgt
specify discrete values ltltimplementationClassgtgt
helper class created in detail design
18
Class Diagrams (Advanced)
Aggregation (independent object lifetime)
Composite (unique member, dependent)
Exception handling
Can have self-associations
ltltsendsgtgt
manager
manages
employee
implements
directionality
19
Class Diagrams (Advanced)
20
One Additional Class Box
Class with independent Runtime thread of
execution AKA Active Class
21
From Domain to Analysis (Specification)
22
From Analysis (Specification) to Implementation
Book
Author
-isbnstring -titlestring writtenby5 Author
-namestring
- writtenby OrderedCollection
23
From Implementation to Code
Author
Smalltalk.Library defineClass Author
superclass Core.Object indexedType
none private false instanceVariableNames
'name writtenBy ' classInstanceVariableNames
'' imports '' category
'Library name aString name
String initialize writtenBy
OrderedCollection new
-namestring
- writtenby OrderedCollection
Book
-isbnstring -titlestring writtenby5 Author
Write a Comment
User Comments (0)
About PowerShow.com