Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented...
-
Upload
nguyenlien -
Category
Documents
-
view
225 -
download
4
Transcript of Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented...
![Page 1: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/1.jpg)
Software Design with UML
by Somboon Patntirapong
![Page 2: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/2.jpg)
Course Overview
• Focuses on the Object-Oriented Analysis and Design (OOAD)
• Uses the UML as a tool for the OOAD modeling process
![Page 3: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/3.jpg)
Software Requirements
• Java Runtime Environment (JRE)– Recommend Java SE DK 5
• Jude version 5 (UML Tool)
• Others UMLTools– ArgoUML, Poseidon, Visual Paradigm– IBM Rational, Borland Together, MagicDraw
![Page 4: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/4.jpg)
Software Requirements
• References– Learning UML 2.0, Oreilly, Russ Miles, Kim Hamilton, 2006– Use Case Driven Object Modeling with UML—Theory
and Practice, Apress, Doug Rosenberg, Matt Stephens, 2007
– http://java.sun.com– www.omg.org
![Page 5: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/5.jpg)
Course Outline
• Chapter 1: Introduction to OOAD and UML• Chapter 2: UseCase Diagram• Chapter 3: Activity Diagram• Chapter 4: Class Diagram• Chapter 5: Advanced Class Diagram• Chapter 6: Object Diagram• Chapter 7: Sequence Diagram• Chapter 8: Collaboration Diagram• Chapter 9: Component Diagram• Chapter 10: Deployment Diagram
![Page 6: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/6.jpg)
Course Outline
• Chapter 11: Package Diagram• Chapter 12: State Diagram• Hand-on Case Study
![Page 7: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/7.jpg)
Chapter 1
Introduction to OOAD and UML
![Page 8: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/8.jpg)
Introduction to OOAD and UML
• Software Development Life Cycle– Requirements and Analysis
– Design
– Development
– Testing
– Deployment
![Page 9: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/9.jpg)
Introduction to OOAD and UML
• Well-known Software Development Processes:– Waterfall
– Iterative
![Page 10: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/10.jpg)
Introduction to OOAD and UML
• OOAD focuses on analysis and design phases– Use features of OO programing language
• UML as a tool (Modeling Language)– Why not model with code?
• What is Unified Modeling Language (UML)?– Notation
• Why UML?– Standard– Comprehensive and concise– Built on lessons learned
![Page 11: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/11.jpg)
Introduction to OOAD and UML
• Degrees of UML– UML as a sketch– UML as a blueprint
• UML consists of diagrams:– UseCase– Activity– Class and Object– Sequence and Collaboration– State– Package– Component and Deployment
![Page 12: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/12.jpg)
Chapter 2
UseCase Diagram
![Page 13: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/13.jpg)
UseCase Diagram• Uses UseCase diagram to model the requirements• Is a starting point of project• Gives you a big picture• Shows who uses the system• Shows the features of the system
![Page 14: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/14.jpg)
UseCase Diagram• Content Management System (CMS) case
• Requirement A1:The content management system shall allow an administrator
to create a new blog account, provided the personal details of the new blogger are verified using the author credentials database.
![Page 15: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/15.jpg)
UseCase Diagram• Actor Element:
– Identifies who or what uses the use cases– Can be a person or a system
![Page 16: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/16.jpg)
UseCase Diagram• Actor Element:
– Generalization/Specialization
![Page 17: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/17.jpg)
UseCase Diagram• UseCase Element:
– Identifies required feature of the system
• Communication Line Element:– Connect an actor and a usecase
![Page 18: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/18.jpg)
UseCase Diagram• System Boundaries Element:
![Page 19: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/19.jpg)
UseCase Diagram• Requirement A2:
The content management system shall allow an administrator to create a new personal Wiki, provided the personal details of the applying author are verified using the author credentials database
![Page 20: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/20.jpg)
UseCase Diagram• <<include>> Element:
– Incorporates behavior
![Page 21: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/21.jpg)
UseCase Diagram• Special Case/Generalization Element:
![Page 22: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/22.jpg)
UseCase Diagram• <<extend>> Element:
– Not always, might or might not
![Page 23: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/23.jpg)
Chapter 3
Activity Diagram
![Page 24: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/24.jpg)
Activity Diagram
• UseCase diagram show what your system should do• Activity diagram show how your system will
accomplish it goals• Shows a procedure or workflow• Similar to flowchart
![Page 25: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/25.jpg)
Activity Diagram
• Initial Node Element:– Starts the activity
• Action Element:– Actions are the active steps in the activity
![Page 26: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/26.jpg)
Activity Diagram
• Flow Element:
• Final Node Element:
![Page 27: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/27.jpg)
Activity Diagram
• Decisions and Merges Element:– Guard : [condition]
![Page 28: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/28.jpg)
Activity Diagram
• Fork and Join Element:– Fork : simultaneous flow– Join : all incoming action must finish before proceed to the
next flow
![Page 29: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/29.jpg)
Activity Diagram
• Object Node Element:– Objects can be passed between actions
![Page 30: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/30.jpg)
Activity Diagram
• Signal Element:– Activity may involve external systems, people, or processes– Eg: authorizing credit card payment– Sending :– Receiving :
![Page 31: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/31.jpg)
Activity Diagram
• Swimlane/Partition Element:– Used to differentiate the participants– Or to group the actions
![Page 32: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/32.jpg)
Activity Diagram
• Case Flow:– The administrator asks the system to create a new blog
account– The administrator selects an account type– The adminstrator enters the author’s details– The author’s details are verified using the author credentials
database– The new blog account is created– A summary of the new blog account’s details are emailed to
the author
• Draw your own one!!
![Page 33: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/33.jpg)
Activity Diagram
![Page 34: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/34.jpg)
Chapter 4
Class Diagram
![Page 35: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/35.jpg)
Class Diagram
• Class diagram shows the classes that you must have to create a system
• So, what is a class?– Class is a blueprint of object
• Program must have at least one class• But normally more than one class (may be a
thousand)• What can the class contain?
– Attributes (Instance Variables)– Operations (Methods)– Constructors
![Page 36: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/36.jpg)
Class Diagram
• Class Diagram:
![Page 37: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/37.jpg)
Class Diagram
• Source code:public class Account{
private double balance;
public Account(double intiBalance){ balance = initBalance; } public boolean deposit(double amt){ .. } public boolean withdraw(double amt){ .. }}
![Page 38: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/38.jpg)
Class Diagram
• Visibility– Private (-)
– Package (~) ( )
– Protected (#)
– Public (+)
• Note:– For Java, protected = package + subclass
![Page 39: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/39.jpg)
Class Diagram
• Class Attributes:– Inline
– Association
![Page 40: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/40.jpg)
Class Diagram
• Multiplicity:– 1 .. 1– 1 .. *– * .. 1– * .. *
![Page 41: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/41.jpg)
Class Diagram
• Attribute Properties
• Source code:
public class CMS{ private final String createdBy = “James & Co..”; ..}
![Page 42: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/42.jpg)
Class Diagram
• Class Operations:
![Page 43: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/43.jpg)
Class Diagram
• Information Hiding– To protect our valuable information (data)– How?
• Encapsulation– We separate the system into many clasess (OO)– BUT each class has protected his own data!!– So, what should we do?
![Page 44: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/44.jpg)
Class Diagram
• Information Hiding/Encapsulation– Can’t apply these concept separately– Otherwise useless!!
![Page 45: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/45.jpg)
Class Diagram
• Static Members:
![Page 46: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/46.jpg)
Chapter 5
Advanced Class Diagram
![Page 47: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/47.jpg)
Advanced Class Diagram
• Classes can have relationships to one another• A class can be a type of another class; generalization• A class can contain objects of another class in
various way
• Class relationship:– Dependency (weakest)– Association– Aggregation– Composition– Inheritance (strongest)
![Page 48: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/48.jpg)
Advanced Class Diagram
• Dependency– Dependency between two classes means one class needs
the other class– One class USES another class– Let say, A depends on B– If B changed, A needs to know the changes!!– If A changed, B doesn’t care
![Page 49: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/49.jpg)
Advanced Class Diagram
• Source Code:
Public class UserInterface{ .. public void main(String args[]){ BlogEntry be = new BlogEntry(); be.setName(“My first blog”); .. }}
![Page 50: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/50.jpg)
Advanced Class Diagram
• Association:– Means that a class will contain a reference to an object of
the other class– In form of an attribute– Relationship stronger than dependency
![Page 51: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/51.jpg)
Advanced Class Diagram
• Source code:
public class BlogAccount{ private BlogEntry[] entries; ..}
public class BlogEntry{ ..}
![Page 52: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/52.jpg)
Advanced Class Diagram
• Association with direction:– Can be unidirection– Or can be bidirection
![Page 53: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/53.jpg)
Advanced Class Diagram
• Association class:– Resolves complex relationship (Many-to-Many)– Depends on object model
![Page 54: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/54.jpg)
Advanced Class Diagram
• Aggregation:– Is just a stronger version of association– Owns but may share object of another class– Owned object may have a lifetime outside the owning object– Deletion of Project doesn’t imply that Employee must be
deleted
![Page 55: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/55.jpg)
Advanced Class Diagram
• Source code:– For java, association and aggregation, coding is not different
public class Project{ private Employee[] emps; ..}
public class Employee{ ..}
![Page 56: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/56.jpg)
Advanced Class Diagram
• Composition:– Kind of aggregation– But stronger than aggregation– Implies that owned objects can’t live without owning object– Eg, Introduction and MainBody don’t have meaning without
BlogEntry
![Page 57: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/57.jpg)
Advanced Class Diagram
• Source code:– Association, Aggregation, and Composition, coding is the
same
public class BlogEntry{ private Introduction intro; private MainBody body; ..}
![Page 58: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/58.jpg)
Advanced Class Diagram
• Generalization:– Inheritance– Is-A relationship or Kind-of relationship– Support multiple inheritance, but beware of conflicts
![Page 59: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/59.jpg)
Advanced Class Diagram
• Source code:
public class Article{ ..}
public class BlogEntry extends Article{ ..}
![Page 60: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/60.jpg)
Advanced Class Diagram
• Abstract Classes:– Classes that define functionality without providing full
implementation– Therefore can not be instantiated– Any class that extends an abstract class must implement
abstract method
![Page 61: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/61.jpg)
Advanced Class Diagram
• Class that extends abstract class:
![Page 62: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/62.jpg)
Advanced Class Diagram
• Source code:
public abstract class Store{ public abstract void store(Article[] articles); public abstract Article[] retrieve();}
public class BlogStore extends Store{ public void store(Article[] article){ .. } public Article[] retrieve(){ .. }}
![Page 63: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/63.jpg)
Advanced Class Diagram
• Interface:– Like class that everything is abstract– Is not for extending, but for implementing– Avoids the problem of multiple inheritance– Methods listed in an interface are all abstract
![Page 64: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/64.jpg)
Advanced Class Diagram
• Class that implements interface:
![Page 65: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/65.jpg)
Advanced Class Diagram
• Source code:
public interface EmailSystem{ public abstract void send(Message msg);}
public class SMTPMailSystem implements EmailSystem{ public void send(Message msg){ .. }}
![Page 66: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/66.jpg)
Chapter 6
Object Diagram
![Page 67: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/67.jpg)
Object Diagram
• Objects are runtime representation of classes• Objects can be called Instances• Object diagram is very similar to a class diagram• Is useful when you want to describe how the objects
within the system work
![Page 68: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/68.jpg)
Object Diagram
• Object can contain/show data:
![Page 69: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/69.jpg)
Object Diagram
• Links:
![Page 70: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/70.jpg)
Chapter 7
Sequence Diagram
![Page 71: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/71.jpg)
Sequence Diagram
• Is a kind of interaction diagram• Shows interaction between parts of your system• Or identifies the objects involved with each process• Focuses on time sequence• One sequence relates directly to one usecase• You will know how well design of you classes with the
sequence diagram
![Page 72: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/72.jpg)
Sequence Diagram
• Participants and Time Lines:– Usually the object– But can be an external system or people
![Page 73: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/73.jpg)
Sequence Diagram
• Messages and Activation Bars:– Invoking methods/operations
![Page 74: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/74.jpg)
Sequence Diagram
• Nested Messages:
![Page 75: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/75.jpg)
Sequence Diagram
• Synchronous Messages:– Waits for response
![Page 76: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/76.jpg)
Sequence Diagram
• Asynchronous Messages:– Don’t wait for a response– Eg, threading, messaging
![Page 77: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/77.jpg)
Sequence Diagram
• Creation and Destruction Messages:
![Page 78: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/78.jpg)
Sequence Diagram
• Creation Messages:– In Java, using new keyword– Eg, new Account(500);
• Destruction Messages:– In Java, doesn’t have to destroy object– Use garbage collector– So, check your preferred language– Implies no use of destruction message!!
![Page 79: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/79.jpg)
Sequence Diagram
• Back to CMS case• Main flow:
– The administrator asks the system to create a new blog account
– The administrator selects the regular blog account type– The administrator enters the author’s details– The author’s details are checked using the author credential
database– The new regular blog account is created– A summary of the new blog account’s detailss are emailed to
the author• Just for review, because we already have the activity
diagram
![Page 80: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/80.jpg)
Sequence Diagram
• Top-Level Sequence Diagram:
![Page 81: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/81.jpg)
Sequence Diagram
• Detailed Sequence Diagram:– Contain more participants, more precise– But too much details may make the diagram complicated– Details may be the actual user interface of your choice
![Page 82: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/82.jpg)
Sequence Diagram
![Page 83: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/83.jpg)
Chapter 8
Collaboration Diagram
![Page 84: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/84.jpg)
Collaboration Diagram
• Another kind of interaction diagram• Alternative to sequence diagram• Objects are concerned with numbered arrows
showing the flow of information• Focuses on link perspective• Called communication diagram in UML 2.0
![Page 85: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/85.jpg)
Collaboration Diagram
• Participants, Links, and Messages:– Participants: objects, people, systems– Links: relationship– Messages: invoking methods (operations)
![Page 86: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/86.jpg)
Collaboration Diagram
• Nested Messages:– The called method invokes others methods
![Page 87: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/87.jpg)
Collaboration Diagram
• Invoking message multiple times:– Format: [i=0..9]
![Page 88: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/88.jpg)
Collaboration Diagram
• Sending a message based on a condition:– Format: [condition=true]
![Page 89: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/89.jpg)
Collaboration Diagram
• Back to CMS Case– Collaboration vs Sequence Diagrams
![Page 90: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/90.jpg)
Collaboration Diagram
![Page 91: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/91.jpg)
Collaboration Diagram
• Collaboration VS Sequence Diagrams– What do you think?– Which one do you prefer?
• Sometimes we need both!!
![Page 92: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/92.jpg)
Chapter 9
Component Diagram
![Page 93: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/93.jpg)
Component Diagram
• Component is a reusable part of your software• Eg, libraries
• Component diagram shows:– Packaging of code– Dependencies between components– Can show nested components
![Page 94: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/94.jpg)
Component Diagram
• A basic component:
• Provided and Required Interfaces:
![Page 95: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/95.jpg)
Component Diagram
• Using stereotype notation:– If you want to show the details of interfaces
![Page 96: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/96.jpg)
Component Diagram
• Components working together:– Components usually work together with other components
![Page 97: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/97.jpg)
Component Diagram
• Dependency:– Component depends on other components
![Page 98: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/98.jpg)
Component Diagram
• Artifacts:– Can be libraries– In Java, JAR Files
![Page 99: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/99.jpg)
Chapter 10
Deployment Diagrams
![Page 100: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/100.jpg)
Deployment Diagram
• Shows the physical view of your system• Shows the physical relationships between hardware
components• Shows components within the nodes• Shows the protocol being used between nodes
![Page 101: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/101.jpg)
Deployment Diagram
• Nodes:– Can be systems:– Eg, Application Server, Web Server, Operating System– Can be hardwares:– Eg, Server, Desktop PC
![Page 102: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/102.jpg)
Deployment Diagram
• Communications:– Shows connection with protocols
![Page 103: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/103.jpg)
Deployment Diagram
• Showing components:– Shows components that are deployed in the node
![Page 104: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/104.jpg)
Deployment Diagram
• Node Instances:
![Page 105: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/105.jpg)
Chapter 11
Package Diagrams
![Page 106: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/106.jpg)
Package Diagram
• Used to grouping items especially classes• Also provides namespaces• Helps member visibility
• How good is system without packages?
![Page 107: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/107.jpg)
Package Diagram
• Packages:– Like folder icon– In Java, directories
![Page 108: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/108.jpg)
Package Diagram
• Contents of a package:– Usually classes– Nested packages, finally classes inside
![Page 109: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/109.jpg)
Package Diagram
• Source Code:
package security;
public class Credential{ ..}
![Page 110: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/110.jpg)
Package Diagram
• Showing class with its package (an alternative)
![Page 111: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/111.jpg)
Package Diagram
• Package Dependency
![Page 112: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/112.jpg)
Chapter 12
State Diagrams
![Page 113: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/113.jpg)
State Diagram
• Shows how one object changes over time• Helps understanding of the model• What shoud do/what should not do• Consists of:
– State– Event
• State diagram is heavily used in niches of software such as:– Embedded System– Real-time System
![Page 114: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/114.jpg)
State Diagram
• States:– Status of being at a certain time– Eg, light: on/off
![Page 115: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/115.jpg)
State Diagram
• Transitions:– Represents a change of states from a source state to a
target state– Event/Trigger makes transition
![Page 116: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/116.jpg)
State Diagram
• Complex Transitions:– Contains conditions or guards
![Page 117: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/117.jpg)
State Diagram
• Internal Transition/Action in State:– Entry, Do, Exit
![Page 118: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/118.jpg)
State Diagram
• Initial and Final State:– Starting and ending points
![Page 119: Software Design with UML - @@ Home - KKU Web Hosting Overview • Focuses on the Object-Oriented Analysis and Design (OOAD) • Uses the UML as a tool for the OOAD modeling process](https://reader033.fdocuments.net/reader033/viewer/2022051803/5b06c8317f8b9a5c308d69df/html5/thumbnails/119.jpg)
Software Design with UML
• What next?– Design pattern– GoF Design pattern– Enterprise pattern
• Hopefully, you like UML• Enjoy your drawing!!
Thank You,Somboon Patntirapong
Copyright 2007