Docstoc

UML Introduction

Document Sample
UML Introduction Powered By Docstoc
					CS427:
Software Engineering I



    Darko Marinov

    (slides from Ralph Johnson)


                              1
 Administrative info

z HW1 graded
  y Projects http://brain.cs.uiuc.edu:8080/SEcourse/Projects+Fall+06
  y Keep forming 8-student groups
     x Current group members decide on new members
z Midterm: confirmed time and room change
  y 7pm on Oct 10 (Tue) in 1404 SC (not DCL!)
     x Makeup exam: 12:30pm on Oct 10 in 1310 DCL
     x Let us know if you have other conflicts
  y Samples    http://brain.cs.uiuc.edu:8080/SEcourse/Exams+Fall+06
                               CS427                           10-2
Topics

z Covered
  y Project initiation and planning
  y Requirements (use cases)
  y Design (architecture)
z Today: UML introduction
  y Notations useful for requirements, specification,
    design, and (potentially) coding


                         CS427                    10-3
Modeling notations (1)

z Used for both requirements analysis and
  for specification and design
z Useful for technical people
z Provide a high-level view
z Require training
z Many notations
  y Each good for something
  y None good for everything
                     CS427                  10-4
Modeling notations (2)

z   Help developers communicate
z   Provide documentation
z   Help find errors (tools check for consistency)
z   Generate code (with tools)




                        CS427                  10-5
Unified Modeling Language (UML)

 z Graphical modeling notations for describing
   and designing (OO software) systems
 z 13 kinds of diagrams (in UML 2.0)
   y Structure
      x Class diagrams (today)
   y Behavior
      x Interaction
         • Sequence diagrams (today)


                            CS427          10-6
UML class diagrams

z Formed by merging Booch Diagrams and
  OMT Object Diagrams
z Descendent of Entity-Relationship
  Diagrams

z Describes data and operations


                    CS427            10-7
Elements of UML class diagram

 z Class
   y Attributes
   y Operations
 z Associations
   y Multiplicity
   y Direction/aggregation
 z Generalization

                       CS427   10-8
Familiar(?) example domain




                             9
Problem source

z From a Design Fest at OOPSLA
 http://designfest.acm.org/Problems/HealthClaims/HealthClaims_96.htm

z In addition to system description, has three
  use cases

z Central concept: claim



                              CS427                           10-10
Claim class diagram




            CS427     10-11
Inheritance




              CS427   10-12
Multiplicity

z 0..1 or 0..N is optional
z 1 is mandatory
z * is 0..N




                      CS427   10-13
 OO modeling points

z Best objects correspond to real-world entities
z Some correspond to actors (adjudicator);
  they are actually interfaces to the actors
z Some correspond to complex processes, but
  this is an exception; should not be common




                       CS427                10-14
Attributes vs. associations




             CS427            10-15
Health claims processing

z Receives health claims and supporting
  documents via many sources:
  electronically, fax, on paper.
z Scanned paper and fax processed by OCR.
  Documents first subject to form dropout,
  deskewing, despeckling.
z All images are logged to optical disk.

                   CS427               10-16
Behavior




           CS427   10-17
OO modeling points

z Class names should be nouns
z Verbs become operations
z Avoid class names ending in “er”




                    CS427            10-18
Analysis vs. design
z Class diagrams are used in both analysis
  and design
z Analysis - conceptual
  y Model problem, not software solution
  y Can include actors outside system
z Design - specification
  y Tells how the system should act
z Design - implementation
  y Actual classes of implementation
                      CS427                10-19
Extending class diagrams

z No modeling notation can do everything
z Modeling notations should be extensible
z UML has two techniques
  y Constraints
  y Stereotypes




                    CS427                   10-20
Constraint




             CS427   10-21
Stereotype




             CS427   10-22
Interfaces to other systems




             CS427        10-23
UML sequence diagrams

z   Model how a set of objects communicate
z   Describe sequence of events (traces)
z   A line for each object
z   Time goes from top to bottom
z   Arrows represent communication events



                     CS427               10-24
Sequence diagram for claim




            CS427        10-25
Class diagram

z Central model for OO systems
z Describes data and behavior
z In UML, used along with Use Cases and
  Packages for analysis
z Also used to describe implementation
z Don’t confuse analysis and implementation!
  y Separate “what” from “how”

                     CS427              10-26
Next: Analysis and design in RUP

 z Read chapters 5-8 of “UML Distilled: Third
   Edition” (“Class Diagrams: Advanced”,
   “Object Diagrams”, “Package Diagrams”,
   “Deployment Diagrams”; 2nd edition:
   chapters 6-7 and first part of 10)
   y Chapters 3-4 listed for today
   y Chapters 1-2 and 9 listed earlier


                        CS427              10-27

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:2
posted:4/21/2014
language:English
pages:27