SlideShare a Scribd company logo
1 of 42
Programming Logic and Design
Eighth Edition
Chapter 13
System Modeling with the UML
Objectives
2
In this chapter, you will learn about:
• System modeling
• The Unified Modeling Language (UML)
• UML use case diagrams
• UML class and object diagrams
• Other UML diagrams
• Deciding when to use the UML and which UML
diagrams to use
Programming Logic and Design, Eighth Edition
Understanding System Modeling
3
• Most computer programs are part of a larger system
– Each program is related to others
– Produce input or output
– Require careful planning
• System design
– Detailed specification of how all parts of a system are
implemented and coordinated
Programming Logic and Design, Eighth Edition
Understanding System Modeling
(continued)
4
• Basic principles:
– Large systems are easier to understand when you break
them down into subsystems
– Good modeling techniques are increasingly important as
the size and complexity of systems increase
– Good models promote communication among technical
and nontechnical workers while ensuring professional
and efficient business solutions
Programming Logic and Design, Eighth Edition
5
Understanding System Modeling
(continued)
• The Unified Modeling Language (UML) allows you to:
– Envision systems with an object-oriented perspective
– Break a system into subsystems
– Focus on the big picture
– Hide the implementation detail
– Communicate between programmers and businesspeople
about system design
– Divide responsibilities for large systems
Programming Logic and Design, Eighth Edition
6
What Is the UML?
• A standard way to specify, construct, and document
systems that use object-oriented methods
• A modeling language, not a programming language
• Has its own notation
– Consists of a set of specialized shapes and conventions
• Construct different kinds of software diagrams and
model different kinds of systems
Programming Logic and Design, Eighth Edition
7
What Is the UML? (continued)
• Create top-view diagrams of business processes
• Hide details and focus on functionality
• Start with a generic view of an application
– Introduce details and complexity later
• Useful as you begin designing business systems
• Very large
– Documentation is more than 800 pages
– 14 diagram types allowing you to “see” the business
process from a different angle
Programming Logic and Design, Eighth Edition
8
What Is the UML? (continued)
• Structure diagrams
– Emphasize the “things” in a system and include:
• Class diagrams
• Object diagrams
• Component diagrams
• Composite structure diagrams
• Package diagrams
• Deployment diagrams
• Profile diagrams
Programming Logic and Design, Eighth Edition
9
What Is the UML? (continued)
• Behavior diagrams
– Emphasize what happens in a system and include:
• Use case diagrams
• Activity diagrams
• State machine diagrams
• Interaction diagrams
– Emphasize the flow of control and data, and include:
• Sequence diagrams
• Communication diagrams
• Timing diagrams
• Interaction overview diagrams
Programming Logic and Design, Eighth Edition
Using UML Use Case Diagrams
10
• Use case diagrams show how a business works
– From the perspective of those who actually interact with
the business (employees, customers, suppliers, etc.)
• Users are called actors
– Represented by stick figures
• Use cases
– Represented by ovals
– System functions or services that are visible to the
system’s actors
Programming Logic and Design, Eighth Edition
Using UML Use Case Diagrams (continued)
11
Figure 13-1 Use case diagram for librarian
Programming Logic and Design, Eighth Edition
Using UML Use Case Diagrams (continued)
12
• Establishing use cases usually follows from analyzing
the main events in a system
• Two main events from a librarian’s point of view:
– acquireNewBook()
– checkOutBook()
• Variations in use cases:
– Extend
– Include
– Generalization
Programming Logic and Design, Eighth Edition
Using UML Use Case Diagrams (continued)
13
• Extend variation
– Shows functions beyond those found in a base case
– Scenario
• A variation in the sequence of actions required in a use case
– Use case has at least one main scenario
• Stereotype
– Can add <<extend>> near the line that shows a
relationship extension
Programming Logic and Design, Eighth Edition
Using UML Use Case Diagrams (continued)
14
Figure 13-2 Use case diagram for librarian with scenario extension
Figure 13-3 Use case diagram for librarian using stereotype
Programming Logic and Design, Eighth Edition
15
Using UML Use Case Diagrams (continued)
• Include variation
– Case can be part of multiple use cases
– Like subroutine or submodule
– Include use case in an oval with a dashed arrow pointing
to the subroutine use case
Figure 13-4 Use case diagram for librarian using include relationship
Programming Logic and Design, Eighth Edition
Using UML Use Case Diagrams (continued)
• Generalization
variation
– Use case is less specific
than others
– Substitute the more
specific case for a
general one
– More specific scenarios
are attached to the
general scenario with
open-headed dashed
arrows
16
Figure 13-5 Use case diagram for
librarian with generalizations
Programming Logic and Design, Eighth Edition
Using UML Use Case Diagrams (continued)
17
Figure 13-6 Use case diagram for librarian with multiple actors
Programming Logic and Design, Eighth Edition
Using UML Use Case Diagrams (continued)
18
• The use case diagram is only a tool to aid
communication
• There is no single “correct” use case diagram
• Elided
– Omit parts of diagrams for clarity
Programming Logic and Design, Eighth Edition
Using UML Use Case Diagrams (continued)
19
Figure 13-7 Use case diagram
emphasizing actors
Figure 13-8 Use case diagram
emphasizing system requirements
Programming Logic and Design, Eighth Edition
Using UML Class and Object
Diagrams
20
• Class diagram
– Illustrates the names, attributes, and methods of a class
– More useful to a system’s programmers than to its users
because it closely resembles code the programmers will
write
• Rectangle divided into three sections:
– Top section contains the name of the class
– Middle section contains the names of the attributes
– Bottom section contains the names of the methods
Programming Logic and Design, Eighth Edition
Using UML Class and Object
Diagrams (continued)
21
Figure 13-9 Book class diagram
Programming Logic and Design, Eighth Edition
Using UML Class and Object
Diagrams (continued)
• Use generalizations with class diagrams
– Open-headed arrow
– Show more general (or parent)
classes and more specific
(or child) classes
– Child classes contain all the
attributes of their parents
• Overriding
– The mechanism by which a child class method is used by
default when a parent class contains a method with the
same signature
22
Figure 13-10 LibraryItem class
diagram showing generalization
Programming Logic and Design, Eighth Edition
Using UML Class and Object
Diagrams (continued)
23
• Relationships between objects
– Association relationship
• Describes the connection or link between objects
• Represented by a straight line
• Arithmetical relationship or ratio included (called cardinality or
multiplicity)
– Whole-part relationship
• One or more classes make up the parts of a larger whole class
• Also called an aggregation or a has-a relationship
• Represented using an open diamond
Programming Logic and Design, Eighth Edition
Using UML Class and Object
Diagrams (continued)
24
Figure 13-11 Class diagram with
association relationship
Figure 13-12 Class diagram with several
association relationships
Programming Logic and Design, Eighth Edition
Using UML Class and Object
Diagrams (continued)
25
Figure 13-13 Class diagram with whole-part
relationship
Figure 13-14 Object diagram for Library
• Object diagrams
– Similar to class
diagrams
– Model specific
instances of classes
– Show a snapshot of
an object at one
point in time
Programming Logic and Design, Eighth Edition
Using Other UML Diagrams
26
• Sequence diagram
– Shows the timing of events in a single use case
– Makes it easier to see the order in which activities occur
– Horizontal axis (x-axis)
• Represents objects
– Vertical axis (y-axis)
• Represents time
Programming Logic and Design, Eighth Edition
Using Other UML Diagrams (continued)
27
• Create sequence diagram
– Place objects across the top of the diagram along the x-axis
– Start at the left with the object or actor that begins the
action
– Beneath each object, place a vertical dashed line
• Represents the period of time the object exists
– Use horizontal arrows to show how the objects
communicate with each other over time
Programming Logic and Design, Eighth Edition
28
Figure 13-15 Sequence diagram for checking out a Book for a Patron
Using Other UML Diagrams (continued)
Programming Logic and Design, Eighth Edition
• Communication
diagram
– Emphasizes the
organization of objects
in a system
– Similar to a sequence
diagram but contains
numbers to represent
the precise order in
which activities occur
– Focuses on object roles
29
Figure 13-16 Communication diagram
for checking out a Book for a Patron
Using Other UML Diagrams (continued)
Programming Logic and Design, Eighth Edition
30
• State machine diagram
– Shows the different statuses
of a class or an object at
different points in time
• Rounded rectangles
– Represent each state
• Arrows
– Show sequence
• Solid dot
– Start and stop states Figure 13-17 State machine diagram
for states of a Book
Using Other UML Diagrams (continued)
Programming Logic and Design, Eighth Edition
31
• Activity diagram
– Shows the flow of actions of a system
• Symbols
– Flowchart stop and start symbols
– Diamonds describe decisions
– Fork
• Defines a branch in which all paths are followed simultaneously
– Join
• Reunites the flow of control after a fork
Using Other UML Diagrams (continued)
Programming Logic and Design, Eighth Edition
32
• Time signal
– Indicates that a specific amount of time should pass
before an action starts
– Looks like two
stacked triangles
Figure 13-20 A time signal starting an action
Using Other UML Diagrams (continued)
Programming Logic and Design, Eighth Edition
• Component and deployment
diagrams
– Document physical aspects of
systems
– Component diagram
• Emphasizes the files, database
tables, documents, and other
components
– Deployment diagram
• Focuses on a system’s hardware
33
Figure 13-21 Component diagram
Using Other UML Diagrams (continued)
Programming Logic and Design, Eighth Edition
34
Figure 13-21 Component diagram Figure 13-22 Deployment diagram
Using Other UML Diagrams (continued)
Programming Logic and Design, Eighth Edition
35
Using Other UML Diagrams (continued)
• Profile diagram
– A newer type of UML diagram
– Extends a UML model:
• For a particular domain
– Like for financial or healthcare applications
• For a particular platform
– Like for .NET or Java
Programming Logic and Design, Eighth Edition
36
Diagramming Exception Handling
• Exception handling
– The set of the object-oriented techniques used to handle
program errors
• Protected node
– try block in the UML
• Handler body node
– catch block in the UML
Programming Logic and Design, Eighth Edition
37
Diagramming Exception Handling
(continued)
Figure 13-23 Exceptions in the Book check-out activity
Programming Logic and Design, Eighth Edition
38
Deciding When to Use the UML
and Which UML Diagrams to Use
• Criticisms:
– Size – too large and complex
– Imprecision – combination of rules and English
– Complexity – difficult to learn
• Under the right circumstances, the UML can
increase communication
• Users, managers, designers, and technicians each
prefer specific system views
• Very few systems require diagrams of all UML types
Programming Logic and Design, Eighth Edition
Summary
39
• System design: a detailed specification of how all parts of
a system are implemented and coordinated
• UML (Unified Modeling Language)
– A standard modeling language for object-oriented systems
– Has its own notation
– 14 diagram types
• Use case
– Shows how a business works from the perspective of those who
interact with the business
– Includes actors
– Variations: extend relationships, include relationships,
generalizations
Programming Logic and Design, Eighth Edition
Summary (continued)
40
• Class diagram
– Illustrates names, attributes, and methods of a class
– Contains the name of the class, the names of the
attributes, and the names of the methods
– Can show generalizations and relationships between
objects
– Object diagrams model specific instances of classes at
one point in time
Programming Logic and Design, Eighth Edition
Summary (continued)
41
• Sequence diagram
– Shows timing of events
• Communication diagram
– Emphasizes organization of objects in a system
• State machine
– Shows different statuses of a class or an object at
different points in time
• Activity diagram
– Shows the flow of actions, including decision branches
Programming Logic and Design, Eighth Edition
Summary (continued)
42
• Component diagram
– Emphasizes files, database tables, documents used by a
system’s software
• Deployment diagram
– Focuses on a system’s hardware
• Profile diagram
– Extends the UML for a particular domain or platform
• Each UML diagram provides a different view of a
system
Programming Logic and Design, Eighth Edition

More Related Content

What's hot

CIS110 Computer Programming Design Chapter (14)
CIS110 Computer Programming Design Chapter  (14)CIS110 Computer Programming Design Chapter  (14)
CIS110 Computer Programming Design Chapter (14)Dr. Ahmed Al Zaidy
 
CIS110 Computer Programming Design Chapter (6)
CIS110 Computer Programming Design Chapter  (6)CIS110 Computer Programming Design Chapter  (6)
CIS110 Computer Programming Design Chapter (6)Dr. Ahmed Al Zaidy
 
Chapter 11: Object Oriented Programming Part 2
Chapter 11: Object Oriented Programming Part 2Chapter 11: Object Oriented Programming Part 2
Chapter 11: Object Oriented Programming Part 2Nicole Ryan
 
Intro to Programming: Modularity
Intro to Programming: ModularityIntro to Programming: Modularity
Intro to Programming: ModularityNicole Ryan
 
Programming Logic and Design: Working with Data
Programming Logic and Design: Working with DataProgramming Logic and Design: Working with Data
Programming Logic and Design: Working with DataNicole Ryan
 
Logic Formulation 3
Logic Formulation 3Logic Formulation 3
Logic Formulation 3deathful
 
Logic Formulation 2
Logic Formulation 2Logic Formulation 2
Logic Formulation 2deathful
 
Program logic and design
Program logic and designProgram logic and design
Program logic and designChaffey College
 
Problem solving (C++ Programming)
Problem solving (C++ Programming)Problem solving (C++ Programming)
Problem solving (C++ Programming)Umair Younas
 
Introduction to problem solving in c++
Introduction to problem solving in c++Introduction to problem solving in c++
Introduction to problem solving in c++Online
 
Problem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to CProblem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to CPrabu U
 
Matlab (Presentation on MATLAB)
Matlab (Presentation on MATLAB)Matlab (Presentation on MATLAB)
Matlab (Presentation on MATLAB)Chetan Allapur
 
Program design and problem solving techniques
Program design and problem solving techniquesProgram design and problem solving techniques
Program design and problem solving techniquesDokka Srinivasu
 

What's hot (17)

CIS110 Computer Programming Design Chapter (14)
CIS110 Computer Programming Design Chapter  (14)CIS110 Computer Programming Design Chapter  (14)
CIS110 Computer Programming Design Chapter (14)
 
CIS110 Computer Programming Design Chapter (6)
CIS110 Computer Programming Design Chapter  (6)CIS110 Computer Programming Design Chapter  (6)
CIS110 Computer Programming Design Chapter (6)
 
Chapter 11: Object Oriented Programming Part 2
Chapter 11: Object Oriented Programming Part 2Chapter 11: Object Oriented Programming Part 2
Chapter 11: Object Oriented Programming Part 2
 
Intro to Programming: Modularity
Intro to Programming: ModularityIntro to Programming: Modularity
Intro to Programming: Modularity
 
Programming Logic and Design: Working with Data
Programming Logic and Design: Working with DataProgramming Logic and Design: Working with Data
Programming Logic and Design: Working with Data
 
Logic Formulation 3
Logic Formulation 3Logic Formulation 3
Logic Formulation 3
 
Logic Formulation 2
Logic Formulation 2Logic Formulation 2
Logic Formulation 2
 
Chapter 02 - Problem Solving
Chapter 02 - Problem SolvingChapter 02 - Problem Solving
Chapter 02 - Problem Solving
 
Program logic and design
Program logic and designProgram logic and design
Program logic and design
 
Problem solving (C++ Programming)
Problem solving (C++ Programming)Problem solving (C++ Programming)
Problem solving (C++ Programming)
 
Introduction to problem solving in c++
Introduction to problem solving in c++Introduction to problem solving in c++
Introduction to problem solving in c++
 
Unit 5
Unit 5Unit 5
Unit 5
 
Problem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to CProblem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to C
 
Unit 4
Unit 4Unit 4
Unit 4
 
Matlab (Presentation on MATLAB)
Matlab (Presentation on MATLAB)Matlab (Presentation on MATLAB)
Matlab (Presentation on MATLAB)
 
Program design and problem solving techniques
Program design and problem solving techniquesProgram design and problem solving techniques
Program design and problem solving techniques
 
Flowcharts
FlowchartsFlowcharts
Flowcharts
 

Viewers also liked

CIS110 Computer Programming Design Chapter (11)
CIS110 Computer Programming Design Chapter  (11)CIS110 Computer Programming Design Chapter  (11)
CIS110 Computer Programming Design Chapter (11)Dr. Ahmed Al Zaidy
 
Game Programming I - Introduction
Game Programming I - IntroductionGame Programming I - Introduction
Game Programming I - IntroductionFrancis Seriña
 
Game Programming I - GD4N
Game Programming I - GD4NGame Programming I - GD4N
Game Programming I - GD4NFrancis Seriña
 
CIS375 Interaction Designs Chapter10
CIS375 Interaction Designs Chapter10CIS375 Interaction Designs Chapter10
CIS375 Interaction Designs Chapter10Dr. Ahmed Al Zaidy
 
Introduction to HTML5 game development (with Phaser)
Introduction to HTML5 game development (with Phaser)Introduction to HTML5 game development (with Phaser)
Introduction to HTML5 game development (with Phaser)Valerio Riva
 
CIS110 Computer Programming Design Chapter (12)
CIS110 Computer Programming Design Chapter  (12)CIS110 Computer Programming Design Chapter  (12)
CIS110 Computer Programming Design Chapter (12)Dr. Ahmed Al Zaidy
 
Skills You Need to Be a Video Game Developer
Skills You Need to Be a Video Game DeveloperSkills You Need to Be a Video Game Developer
Skills You Need to Be a Video Game DeveloperMSBCollege
 
CIS375 Interaction Designs Chapter12
CIS375 Interaction Designs Chapter12CIS375 Interaction Designs Chapter12
CIS375 Interaction Designs Chapter12Dr. Ahmed Al Zaidy
 
INTRODUCTION OF GAME DESIGN AND DEVELOPMENT
INTRODUCTION OF GAME DESIGN AND DEVELOPMENTINTRODUCTION OF GAME DESIGN AND DEVELOPMENT
INTRODUCTION OF GAME DESIGN AND DEVELOPMENTLaili Farhana M.I.
 
Procedural Content Generation
Procedural Content GenerationProcedural Content Generation
Procedural Content GenerationPier Luca Lanzi
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game DevelopmentShaan Alam
 
Videogame Design and Programming - 08 The Design Document
Videogame Design and Programming - 08 The Design DocumentVideogame Design and Programming - 08 The Design Document
Videogame Design and Programming - 08 The Design DocumentPier Luca Lanzi
 
Introduzione alla realizzazione di videogiochi - Game Engine
Introduzione alla realizzazione di videogiochi - Game EngineIntroduzione alla realizzazione di videogiochi - Game Engine
Introduzione alla realizzazione di videogiochi - Game EnginePier Luca Lanzi
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game DevelopmentiTawy Community
 
Focus Junior - 14 Maggio 2016
Focus Junior - 14 Maggio 2016Focus Junior - 14 Maggio 2016
Focus Junior - 14 Maggio 2016Pier Luca Lanzi
 
Game Development Step by Step
Game Development Step by StepGame Development Step by Step
Game Development Step by StepBayu Sembada
 

Viewers also liked (18)

CIS110 Computer Programming Design Chapter (11)
CIS110 Computer Programming Design Chapter  (11)CIS110 Computer Programming Design Chapter  (11)
CIS110 Computer Programming Design Chapter (11)
 
Game Programming I - Introduction
Game Programming I - IntroductionGame Programming I - Introduction
Game Programming I - Introduction
 
Game Programming I - GD4N
Game Programming I - GD4NGame Programming I - GD4N
Game Programming I - GD4N
 
Game Math
Game MathGame Math
Game Math
 
Game Production
Game ProductionGame Production
Game Production
 
CIS375 Interaction Designs Chapter10
CIS375 Interaction Designs Chapter10CIS375 Interaction Designs Chapter10
CIS375 Interaction Designs Chapter10
 
Introduction to HTML5 game development (with Phaser)
Introduction to HTML5 game development (with Phaser)Introduction to HTML5 game development (with Phaser)
Introduction to HTML5 game development (with Phaser)
 
CIS110 Computer Programming Design Chapter (12)
CIS110 Computer Programming Design Chapter  (12)CIS110 Computer Programming Design Chapter  (12)
CIS110 Computer Programming Design Chapter (12)
 
Skills You Need to Be a Video Game Developer
Skills You Need to Be a Video Game DeveloperSkills You Need to Be a Video Game Developer
Skills You Need to Be a Video Game Developer
 
CIS375 Interaction Designs Chapter12
CIS375 Interaction Designs Chapter12CIS375 Interaction Designs Chapter12
CIS375 Interaction Designs Chapter12
 
INTRODUCTION OF GAME DESIGN AND DEVELOPMENT
INTRODUCTION OF GAME DESIGN AND DEVELOPMENTINTRODUCTION OF GAME DESIGN AND DEVELOPMENT
INTRODUCTION OF GAME DESIGN AND DEVELOPMENT
 
Procedural Content Generation
Procedural Content GenerationProcedural Content Generation
Procedural Content Generation
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game Development
 
Videogame Design and Programming - 08 The Design Document
Videogame Design and Programming - 08 The Design DocumentVideogame Design and Programming - 08 The Design Document
Videogame Design and Programming - 08 The Design Document
 
Introduzione alla realizzazione di videogiochi - Game Engine
Introduzione alla realizzazione di videogiochi - Game EngineIntroduzione alla realizzazione di videogiochi - Game Engine
Introduzione alla realizzazione di videogiochi - Game Engine
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game Development
 
Focus Junior - 14 Maggio 2016
Focus Junior - 14 Maggio 2016Focus Junior - 14 Maggio 2016
Focus Junior - 14 Maggio 2016
 
Game Development Step by Step
Game Development Step by StepGame Development Step by Step
Game Development Step by Step
 

Similar to CIS110 Computer Programming Design Chapter (13)

analysis and design with uml
analysis and design with umlanalysis and design with uml
analysis and design with umlsabin kafle
 
Modeling software with UML
Modeling software with UMLModeling software with UML
Modeling software with UML6020 peaks
 
UML (Hemant rajak)
UML (Hemant rajak)UML (Hemant rajak)
UML (Hemant rajak)hrajak5
 
Unified Modeling Language (UML)
Unified Modeling Language (UML)Unified Modeling Language (UML)
Unified Modeling Language (UML)Ajeng Savitri
 
UML and Case study
UML and Case study UML and Case study
UML and Case study Mihika-QA
 
Software Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdfSoftware Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdfMeagGhn
 
lecture8UML Diagrams.pptx
lecture8UML Diagrams.pptxlecture8UML Diagrams.pptx
lecture8UML Diagrams.pptxGracePeter10
 
Unit-II(STATIC UML DIAGRAMS).ppt
Unit-II(STATIC UML DIAGRAMS).pptUnit-II(STATIC UML DIAGRAMS).ppt
Unit-II(STATIC UML DIAGRAMS).pptganeshkarthy
 
4.o o design tools=uml -_lecture 4
4.o o design tools=uml -_lecture 44.o o design tools=uml -_lecture 4
4.o o design tools=uml -_lecture 4Warui Maina
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentationanasz3z3
 
UNIFIED MODELING LANGUAGE
UNIFIED MODELING LANGUAGEUNIFIED MODELING LANGUAGE
UNIFIED MODELING LANGUAGERaval Chirag
 
Uml(unified modeling language) Homework Help
Uml(unified modeling language) Homework HelpUml(unified modeling language) Homework Help
Uml(unified modeling language) Homework HelpSteve Nash
 
UNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptxUNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptxviju001
 
Introduction To Uml
Introduction To UmlIntroduction To Uml
Introduction To Umlguest514814
 

Similar to CIS110 Computer Programming Design Chapter (13) (20)

analysis and design with uml
analysis and design with umlanalysis and design with uml
analysis and design with uml
 
SE UML.ppt
SE UML.pptSE UML.ppt
SE UML.ppt
 
Modeling software with UML
Modeling software with UMLModeling software with UML
Modeling software with UML
 
UML (Hemant rajak)
UML (Hemant rajak)UML (Hemant rajak)
UML (Hemant rajak)
 
Unified Modeling Language (UML)
Unified Modeling Language (UML)Unified Modeling Language (UML)
Unified Modeling Language (UML)
 
Case stydy cs701
Case stydy cs701 Case stydy cs701
Case stydy cs701
 
UML and Case study
UML and Case study UML and Case study
UML and Case study
 
Software Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdfSoftware Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdf
 
lecture8UML Diagrams.pptx
lecture8UML Diagrams.pptxlecture8UML Diagrams.pptx
lecture8UML Diagrams.pptx
 
UML tutorial
UML tutorialUML tutorial
UML tutorial
 
Unit-II(STATIC UML DIAGRAMS).ppt
Unit-II(STATIC UML DIAGRAMS).pptUnit-II(STATIC UML DIAGRAMS).ppt
Unit-II(STATIC UML DIAGRAMS).ppt
 
4.o o design tools=uml -_lecture 4
4.o o design tools=uml -_lecture 44.o o design tools=uml -_lecture 4
4.o o design tools=uml -_lecture 4
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
 
Case Study Uml
Case Study UmlCase Study Uml
Case Study Uml
 
UNIFIED MODELING LANGUAGE
UNIFIED MODELING LANGUAGEUNIFIED MODELING LANGUAGE
UNIFIED MODELING LANGUAGE
 
Cs8592 ooad unit 1
Cs8592 ooad unit 1Cs8592 ooad unit 1
Cs8592 ooad unit 1
 
Cs8592 ooad unit 1
Cs8592 ooad unit 1Cs8592 ooad unit 1
Cs8592 ooad unit 1
 
Uml(unified modeling language) Homework Help
Uml(unified modeling language) Homework HelpUml(unified modeling language) Homework Help
Uml(unified modeling language) Homework Help
 
UNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptxUNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptx
 
Introduction To Uml
Introduction To UmlIntroduction To Uml
Introduction To Uml
 

More from Dr. Ahmed Al Zaidy

Chapter 14 Exploring Object-based Programming
Chapter 14 Exploring Object-based ProgrammingChapter 14 Exploring Object-based Programming
Chapter 14 Exploring Object-based ProgrammingDr. Ahmed Al Zaidy
 
Chapter 13 Programming for web forms
Chapter 13 Programming for web formsChapter 13 Programming for web forms
Chapter 13 Programming for web formsDr. Ahmed Al Zaidy
 
Chapter 12 Working with Document nodes and style sheets
Chapter 12 Working with Document nodes and style sheetsChapter 12 Working with Document nodes and style sheets
Chapter 12 Working with Document nodes and style sheetsDr. Ahmed Al Zaidy
 
Chapter 11 Working with Events and Styles
Chapter 11 Working with Events and StylesChapter 11 Working with Events and Styles
Chapter 11 Working with Events and StylesDr. Ahmed Al Zaidy
 
Chapter 10 Exploring arrays, loops, and conditional statements
Chapter 10 Exploring arrays, loops, and conditional statementsChapter 10 Exploring arrays, loops, and conditional statements
Chapter 10 Exploring arrays, loops, and conditional statementsDr. Ahmed Al Zaidy
 
Chapter 9 Getting Started with JavaScript
Chapter 9 Getting Started with JavaScriptChapter 9 Getting Started with JavaScript
Chapter 9 Getting Started with JavaScriptDr. Ahmed Al Zaidy
 
Chapter 8 Enhancing a website with multimedia
Chapter 8 Enhancing a website with multimediaChapter 8 Enhancing a website with multimedia
Chapter 8 Enhancing a website with multimediaDr. Ahmed Al Zaidy
 
Chapter 7 Designing a web form
Chapter 7 Designing a web formChapter 7 Designing a web form
Chapter 7 Designing a web formDr. Ahmed Al Zaidy
 
Chapter 6 Working with Tables and Columns
Chapter 6 Working with Tables and ColumnsChapter 6 Working with Tables and Columns
Chapter 6 Working with Tables and ColumnsDr. Ahmed Al Zaidy
 
Chapter 5 Designing for the mobile web
Chapter 5 Designing for the mobile webChapter 5 Designing for the mobile web
Chapter 5 Designing for the mobile webDr. Ahmed Al Zaidy
 
Chapter 4 Graphic Design with CSS
Chapter 4 Graphic Design with CSSChapter 4 Graphic Design with CSS
Chapter 4 Graphic Design with CSSDr. Ahmed Al Zaidy
 
Chapter 3 Designing a Page Layout
Chapter 3 Designing a Page LayoutChapter 3 Designing a Page Layout
Chapter 3 Designing a Page LayoutDr. Ahmed Al Zaidy
 
Chapter 2 Getting Started with CSS
Chapter 2 Getting Started with CSSChapter 2 Getting Started with CSS
Chapter 2 Getting Started with CSSDr. Ahmed Al Zaidy
 
Chapter 1 Getting Started with HTML5
Chapter 1 Getting Started with HTML5Chapter 1 Getting Started with HTML5
Chapter 1 Getting Started with HTML5Dr. Ahmed Al Zaidy
 
testing throughout-the-software-life-cycle-section-2
testing throughout-the-software-life-cycle-section-2testing throughout-the-software-life-cycle-section-2
testing throughout-the-software-life-cycle-section-2Dr. Ahmed Al Zaidy
 
Chapter 14 Business Continuity
Chapter 14 Business ContinuityChapter 14 Business Continuity
Chapter 14 Business ContinuityDr. Ahmed Al Zaidy
 
Chapter 13 Vulnerability Assessment and Data Security
Chapter 13 Vulnerability Assessment and Data SecurityChapter 13 Vulnerability Assessment and Data Security
Chapter 13 Vulnerability Assessment and Data SecurityDr. Ahmed Al Zaidy
 

More from Dr. Ahmed Al Zaidy (20)

Chapter 14 Exploring Object-based Programming
Chapter 14 Exploring Object-based ProgrammingChapter 14 Exploring Object-based Programming
Chapter 14 Exploring Object-based Programming
 
Chapter 13 Programming for web forms
Chapter 13 Programming for web formsChapter 13 Programming for web forms
Chapter 13 Programming for web forms
 
Chapter 12 Working with Document nodes and style sheets
Chapter 12 Working with Document nodes and style sheetsChapter 12 Working with Document nodes and style sheets
Chapter 12 Working with Document nodes and style sheets
 
Chapter 11 Working with Events and Styles
Chapter 11 Working with Events and StylesChapter 11 Working with Events and Styles
Chapter 11 Working with Events and Styles
 
Chapter 10 Exploring arrays, loops, and conditional statements
Chapter 10 Exploring arrays, loops, and conditional statementsChapter 10 Exploring arrays, loops, and conditional statements
Chapter 10 Exploring arrays, loops, and conditional statements
 
Chapter 9 Getting Started with JavaScript
Chapter 9 Getting Started with JavaScriptChapter 9 Getting Started with JavaScript
Chapter 9 Getting Started with JavaScript
 
Chapter 8 Enhancing a website with multimedia
Chapter 8 Enhancing a website with multimediaChapter 8 Enhancing a website with multimedia
Chapter 8 Enhancing a website with multimedia
 
Chapter 7 Designing a web form
Chapter 7 Designing a web formChapter 7 Designing a web form
Chapter 7 Designing a web form
 
Chapter 6 Working with Tables and Columns
Chapter 6 Working with Tables and ColumnsChapter 6 Working with Tables and Columns
Chapter 6 Working with Tables and Columns
 
Chapter 5 Designing for the mobile web
Chapter 5 Designing for the mobile webChapter 5 Designing for the mobile web
Chapter 5 Designing for the mobile web
 
Chapter 4 Graphic Design with CSS
Chapter 4 Graphic Design with CSSChapter 4 Graphic Design with CSS
Chapter 4 Graphic Design with CSS
 
Chapter 3 Designing a Page Layout
Chapter 3 Designing a Page LayoutChapter 3 Designing a Page Layout
Chapter 3 Designing a Page Layout
 
Chapter 2 Getting Started with CSS
Chapter 2 Getting Started with CSSChapter 2 Getting Started with CSS
Chapter 2 Getting Started with CSS
 
Chapter 1 Getting Started with HTML5
Chapter 1 Getting Started with HTML5Chapter 1 Getting Started with HTML5
Chapter 1 Getting Started with HTML5
 
Integer overflows
Integer overflowsInteger overflows
Integer overflows
 
testing throughout-the-software-life-cycle-section-2
testing throughout-the-software-life-cycle-section-2testing throughout-the-software-life-cycle-section-2
testing throughout-the-software-life-cycle-section-2
 
Fundamental of testing
Fundamental of testingFundamental of testing
Fundamental of testing
 
Chapter 15 Risk Mitigation
Chapter 15 Risk MitigationChapter 15 Risk Mitigation
Chapter 15 Risk Mitigation
 
Chapter 14 Business Continuity
Chapter 14 Business ContinuityChapter 14 Business Continuity
Chapter 14 Business Continuity
 
Chapter 13 Vulnerability Assessment and Data Security
Chapter 13 Vulnerability Assessment and Data SecurityChapter 13 Vulnerability Assessment and Data Security
Chapter 13 Vulnerability Assessment and Data Security
 

Recently uploaded

Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 

Recently uploaded (20)

Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 

CIS110 Computer Programming Design Chapter (13)

  • 1. Programming Logic and Design Eighth Edition Chapter 13 System Modeling with the UML
  • 2. Objectives 2 In this chapter, you will learn about: • System modeling • The Unified Modeling Language (UML) • UML use case diagrams • UML class and object diagrams • Other UML diagrams • Deciding when to use the UML and which UML diagrams to use Programming Logic and Design, Eighth Edition
  • 3. Understanding System Modeling 3 • Most computer programs are part of a larger system – Each program is related to others – Produce input or output – Require careful planning • System design – Detailed specification of how all parts of a system are implemented and coordinated Programming Logic and Design, Eighth Edition
  • 4. Understanding System Modeling (continued) 4 • Basic principles: – Large systems are easier to understand when you break them down into subsystems – Good modeling techniques are increasingly important as the size and complexity of systems increase – Good models promote communication among technical and nontechnical workers while ensuring professional and efficient business solutions Programming Logic and Design, Eighth Edition
  • 5. 5 Understanding System Modeling (continued) • The Unified Modeling Language (UML) allows you to: – Envision systems with an object-oriented perspective – Break a system into subsystems – Focus on the big picture – Hide the implementation detail – Communicate between programmers and businesspeople about system design – Divide responsibilities for large systems Programming Logic and Design, Eighth Edition
  • 6. 6 What Is the UML? • A standard way to specify, construct, and document systems that use object-oriented methods • A modeling language, not a programming language • Has its own notation – Consists of a set of specialized shapes and conventions • Construct different kinds of software diagrams and model different kinds of systems Programming Logic and Design, Eighth Edition
  • 7. 7 What Is the UML? (continued) • Create top-view diagrams of business processes • Hide details and focus on functionality • Start with a generic view of an application – Introduce details and complexity later • Useful as you begin designing business systems • Very large – Documentation is more than 800 pages – 14 diagram types allowing you to “see” the business process from a different angle Programming Logic and Design, Eighth Edition
  • 8. 8 What Is the UML? (continued) • Structure diagrams – Emphasize the “things” in a system and include: • Class diagrams • Object diagrams • Component diagrams • Composite structure diagrams • Package diagrams • Deployment diagrams • Profile diagrams Programming Logic and Design, Eighth Edition
  • 9. 9 What Is the UML? (continued) • Behavior diagrams – Emphasize what happens in a system and include: • Use case diagrams • Activity diagrams • State machine diagrams • Interaction diagrams – Emphasize the flow of control and data, and include: • Sequence diagrams • Communication diagrams • Timing diagrams • Interaction overview diagrams Programming Logic and Design, Eighth Edition
  • 10. Using UML Use Case Diagrams 10 • Use case diagrams show how a business works – From the perspective of those who actually interact with the business (employees, customers, suppliers, etc.) • Users are called actors – Represented by stick figures • Use cases – Represented by ovals – System functions or services that are visible to the system’s actors Programming Logic and Design, Eighth Edition
  • 11. Using UML Use Case Diagrams (continued) 11 Figure 13-1 Use case diagram for librarian Programming Logic and Design, Eighth Edition
  • 12. Using UML Use Case Diagrams (continued) 12 • Establishing use cases usually follows from analyzing the main events in a system • Two main events from a librarian’s point of view: – acquireNewBook() – checkOutBook() • Variations in use cases: – Extend – Include – Generalization Programming Logic and Design, Eighth Edition
  • 13. Using UML Use Case Diagrams (continued) 13 • Extend variation – Shows functions beyond those found in a base case – Scenario • A variation in the sequence of actions required in a use case – Use case has at least one main scenario • Stereotype – Can add <<extend>> near the line that shows a relationship extension Programming Logic and Design, Eighth Edition
  • 14. Using UML Use Case Diagrams (continued) 14 Figure 13-2 Use case diagram for librarian with scenario extension Figure 13-3 Use case diagram for librarian using stereotype Programming Logic and Design, Eighth Edition
  • 15. 15 Using UML Use Case Diagrams (continued) • Include variation – Case can be part of multiple use cases – Like subroutine or submodule – Include use case in an oval with a dashed arrow pointing to the subroutine use case Figure 13-4 Use case diagram for librarian using include relationship Programming Logic and Design, Eighth Edition
  • 16. Using UML Use Case Diagrams (continued) • Generalization variation – Use case is less specific than others – Substitute the more specific case for a general one – More specific scenarios are attached to the general scenario with open-headed dashed arrows 16 Figure 13-5 Use case diagram for librarian with generalizations Programming Logic and Design, Eighth Edition
  • 17. Using UML Use Case Diagrams (continued) 17 Figure 13-6 Use case diagram for librarian with multiple actors Programming Logic and Design, Eighth Edition
  • 18. Using UML Use Case Diagrams (continued) 18 • The use case diagram is only a tool to aid communication • There is no single “correct” use case diagram • Elided – Omit parts of diagrams for clarity Programming Logic and Design, Eighth Edition
  • 19. Using UML Use Case Diagrams (continued) 19 Figure 13-7 Use case diagram emphasizing actors Figure 13-8 Use case diagram emphasizing system requirements Programming Logic and Design, Eighth Edition
  • 20. Using UML Class and Object Diagrams 20 • Class diagram – Illustrates the names, attributes, and methods of a class – More useful to a system’s programmers than to its users because it closely resembles code the programmers will write • Rectangle divided into three sections: – Top section contains the name of the class – Middle section contains the names of the attributes – Bottom section contains the names of the methods Programming Logic and Design, Eighth Edition
  • 21. Using UML Class and Object Diagrams (continued) 21 Figure 13-9 Book class diagram Programming Logic and Design, Eighth Edition
  • 22. Using UML Class and Object Diagrams (continued) • Use generalizations with class diagrams – Open-headed arrow – Show more general (or parent) classes and more specific (or child) classes – Child classes contain all the attributes of their parents • Overriding – The mechanism by which a child class method is used by default when a parent class contains a method with the same signature 22 Figure 13-10 LibraryItem class diagram showing generalization Programming Logic and Design, Eighth Edition
  • 23. Using UML Class and Object Diagrams (continued) 23 • Relationships between objects – Association relationship • Describes the connection or link between objects • Represented by a straight line • Arithmetical relationship or ratio included (called cardinality or multiplicity) – Whole-part relationship • One or more classes make up the parts of a larger whole class • Also called an aggregation or a has-a relationship • Represented using an open diamond Programming Logic and Design, Eighth Edition
  • 24. Using UML Class and Object Diagrams (continued) 24 Figure 13-11 Class diagram with association relationship Figure 13-12 Class diagram with several association relationships Programming Logic and Design, Eighth Edition
  • 25. Using UML Class and Object Diagrams (continued) 25 Figure 13-13 Class diagram with whole-part relationship Figure 13-14 Object diagram for Library • Object diagrams – Similar to class diagrams – Model specific instances of classes – Show a snapshot of an object at one point in time Programming Logic and Design, Eighth Edition
  • 26. Using Other UML Diagrams 26 • Sequence diagram – Shows the timing of events in a single use case – Makes it easier to see the order in which activities occur – Horizontal axis (x-axis) • Represents objects – Vertical axis (y-axis) • Represents time Programming Logic and Design, Eighth Edition
  • 27. Using Other UML Diagrams (continued) 27 • Create sequence diagram – Place objects across the top of the diagram along the x-axis – Start at the left with the object or actor that begins the action – Beneath each object, place a vertical dashed line • Represents the period of time the object exists – Use horizontal arrows to show how the objects communicate with each other over time Programming Logic and Design, Eighth Edition
  • 28. 28 Figure 13-15 Sequence diagram for checking out a Book for a Patron Using Other UML Diagrams (continued) Programming Logic and Design, Eighth Edition
  • 29. • Communication diagram – Emphasizes the organization of objects in a system – Similar to a sequence diagram but contains numbers to represent the precise order in which activities occur – Focuses on object roles 29 Figure 13-16 Communication diagram for checking out a Book for a Patron Using Other UML Diagrams (continued) Programming Logic and Design, Eighth Edition
  • 30. 30 • State machine diagram – Shows the different statuses of a class or an object at different points in time • Rounded rectangles – Represent each state • Arrows – Show sequence • Solid dot – Start and stop states Figure 13-17 State machine diagram for states of a Book Using Other UML Diagrams (continued) Programming Logic and Design, Eighth Edition
  • 31. 31 • Activity diagram – Shows the flow of actions of a system • Symbols – Flowchart stop and start symbols – Diamonds describe decisions – Fork • Defines a branch in which all paths are followed simultaneously – Join • Reunites the flow of control after a fork Using Other UML Diagrams (continued) Programming Logic and Design, Eighth Edition
  • 32. 32 • Time signal – Indicates that a specific amount of time should pass before an action starts – Looks like two stacked triangles Figure 13-20 A time signal starting an action Using Other UML Diagrams (continued) Programming Logic and Design, Eighth Edition
  • 33. • Component and deployment diagrams – Document physical aspects of systems – Component diagram • Emphasizes the files, database tables, documents, and other components – Deployment diagram • Focuses on a system’s hardware 33 Figure 13-21 Component diagram Using Other UML Diagrams (continued) Programming Logic and Design, Eighth Edition
  • 34. 34 Figure 13-21 Component diagram Figure 13-22 Deployment diagram Using Other UML Diagrams (continued) Programming Logic and Design, Eighth Edition
  • 35. 35 Using Other UML Diagrams (continued) • Profile diagram – A newer type of UML diagram – Extends a UML model: • For a particular domain – Like for financial or healthcare applications • For a particular platform – Like for .NET or Java Programming Logic and Design, Eighth Edition
  • 36. 36 Diagramming Exception Handling • Exception handling – The set of the object-oriented techniques used to handle program errors • Protected node – try block in the UML • Handler body node – catch block in the UML Programming Logic and Design, Eighth Edition
  • 37. 37 Diagramming Exception Handling (continued) Figure 13-23 Exceptions in the Book check-out activity Programming Logic and Design, Eighth Edition
  • 38. 38 Deciding When to Use the UML and Which UML Diagrams to Use • Criticisms: – Size – too large and complex – Imprecision – combination of rules and English – Complexity – difficult to learn • Under the right circumstances, the UML can increase communication • Users, managers, designers, and technicians each prefer specific system views • Very few systems require diagrams of all UML types Programming Logic and Design, Eighth Edition
  • 39. Summary 39 • System design: a detailed specification of how all parts of a system are implemented and coordinated • UML (Unified Modeling Language) – A standard modeling language for object-oriented systems – Has its own notation – 14 diagram types • Use case – Shows how a business works from the perspective of those who interact with the business – Includes actors – Variations: extend relationships, include relationships, generalizations Programming Logic and Design, Eighth Edition
  • 40. Summary (continued) 40 • Class diagram – Illustrates names, attributes, and methods of a class – Contains the name of the class, the names of the attributes, and the names of the methods – Can show generalizations and relationships between objects – Object diagrams model specific instances of classes at one point in time Programming Logic and Design, Eighth Edition
  • 41. Summary (continued) 41 • Sequence diagram – Shows timing of events • Communication diagram – Emphasizes organization of objects in a system • State machine – Shows different statuses of a class or an object at different points in time • Activity diagram – Shows the flow of actions, including decision branches Programming Logic and Design, Eighth Edition
  • 42. Summary (continued) 42 • Component diagram – Emphasizes files, database tables, documents used by a system’s software • Deployment diagram – Focuses on a system’s hardware • Profile diagram – Extends the UML for a particular domain or platform • Each UML diagram provides a different view of a system Programming Logic and Design, Eighth Edition