SlideShare a Scribd company logo
The Unified Modelling Language (UML)
อาจารย์สมเกียรติ ช่อเหมือน (tkorinp@hotmail.com)
สาขาวิชาวิศวกรรมซอฟต์แวร์ คณะวิทยาศาสตร์และเทคโนโลยี
The Unified Modelling Language (UML)
• An introduction to UML
UML Class Diagrams
UML Syntax
UML Package Diagrams
UML Object diagrams
UML Sequence Diagrams
UML (Unified Modelling Language)
• การสร้างแบบจาลองซอฟต์แวร์ ในรูปของสัญลักษณ์
• เพื่อใช้ในการอธิบายระเบียบวิธีการ
• เข้าใจลาดับขั้นตอนในการทางานให้บรรลุผล
• จัดลาดับของกิจกรรมเพื่อรวบรวมความต้องการของผู้ใช้
• กระบวนการเขียน Diagram โดยใช้ สัญลักษณ์ในการออกแบบซอฟต์แวร์
นาเสนอ และตกลงร่วมกัน
• ใช้แผนภาพประกอบเพื่อช่วยให้เข้าใจได้ง่าย และอธิบายข้อมูลทางเทคนิคให้
ถูกต้องตรงกันและชัดเจนขึ้น
• นาไปใช้ในกระบวนต่อไปของการพัฒนาซอฟต์แวร์ได้
• ไม่ใช้วิธีการ แต่เป็นสิ่งที่นาไปใช้ช่วยให้สามารถออกแบบและนาไปใช้ได้อย่าง
ถูกต้อง ด้วยการสร้างแผนภาพ เพื่อเป็นแนวทางที่เหมาะสมตามความต้องการ
Class diagrams
• แผนภาพพื้นฐานของแนวคิดเชิงวัตถุ
• แสดงรายละเอียดของสิ่งต่างๆ
• แสดงความเกี่ยวข้องของสิ่งต่างๆ
• แสดงสถาปัตยกรรมของระบบ
Class diagrams
• Class ชั้นประกอบด้วย
– ชื่อไม่ซ้ากัน (*ขึ้นต้นด้วยตัวพิมพ์ใหญ่)
– รายการแอตทริบิวต์
– รายการของวิธีการ
• การมองเห็นและการเข้าถึงจากภายนอก (visibility modifiers)
– private Attributes
– public methods
• ทราบถึงข้อมูลที่สนใจและสามารถตัดส่วนที่ไม่สนใจออกได้
• บาง Class จะเรียกใช้งาน Classอื่น ๆ
• ความสัมพันธ์เหล่านี้จะแสดงโดยลูกศร
Class diagrams
• Classes
– - attributes
– - operations
– - visibility
• Relationships
– - navigability
– - multiplicity
– - dependency
– - aggregation
– - composition
• Generalization / specialization
– - inheritance
– - interfaces
• Keywords
• Notes and Comments
UML Syntax
• Visibility
‘+’ public
‘-’ private
‘#’ protected
‘~’ package
• Multiplicity is one
‘n’ exactly n
‘*’ zero or more
‘m..‘n’ between m and n
UML Syntax
• Visibility
‘+’ public
‘-’ private
‘#’ protected
‘~’ package
• Multiplicity is one
‘n’ exactly n
‘*’ zero or more
‘m..‘n’ between m and n
Examples of attributes
• visibility name (par1 : type1, par2 : type2): returntype
- custRef : int [1]
# itemCodes : String [1..*]
validCard : boolean
Examples of method
• + addName (newName : String) : boolean
relationships between classes
• ‘Association’
multiplicity
‘source’ class points to the ‘target’
Relationships between classes
• The diagram below shows this information
• All class names begin in uppercase
• attribute and method names begin in lowercase.
• class ItemForSale describes a single item
• ‘listOfItems’ list of zero or more individual objects
Types of Association
• Dependency
• Simple association
• Bidirectional association
• Aggregation and
• Composition
Inheritance
การ คลาส A สืบทอดมาจากคลาส B
Interfaces
• implemented by Publication
• required by CashTill
<<realizes>>
“ball and socket” in UML2
Notes
elements of UML Class Diagram notation
elements of UML Class Diagram notation
Package Diagrams
Package Naming
• package names are normally in lowercase
• local individual projects packages
– Mysystem
– mysystem.interface
– mysystem.engine
– mysystem.engine.util
– mysystem.database
• based on URL
Package Diagram
• Dependency arrows have been drawn to highlight relationships between
packages. When more thought has been put into determining these relationships they
may turn out to be associations
UML Object Diagrams
• objectName : ClassName
• attribute = value
Sequence Diagrams
actions taking place
Sequence Diagrams
• Selection and Iteration
– The logic of a scenario often depends on selection (‘if’) and
iteration (loops).
– There is a notation (‘interaction frames’) which allow ifs and
loops to be represented in sequence
diagrams however these tend to make the diagrams
cluttered.
– Sequence diagrams are generally best used for illustrating
particular cases, with the full refinement reserved for the
implementation code.
UML notation (สัญลักษณ์)
UML
https://www.google.co.th/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwi-
wsj0kqbLAhXHCo4KHRWzDdcQjRwIBw&url=http%3A%2F%2Fwww.sedris.org%2Fdm_notn.htm&psig=AFQjCNHYZn1cgpz8DvGn-gXSSomANAKAPQ&ust=1457150162826343
สัญลักษณ์ที่ใช้ในการเขียน UML
UML class-object
Elephant
e1 e2
UML
new
สรุป
• UML เป็นภาษาที่ใช้กาหนดรายละเอียดโดยใช้โมเดลด้าน
ซอฟต์แวร์ เพื่อช่วยให้สามารถทางานร่วมกันได้ โดยยึดรูปแบบที่
วิเคราะห์และออกแบบไว้ร่วมกัน
• แผนภาพแต่ละชนิดใช้สาหรับแสดงรายละเอียดของซอฟต์แวร์
แตกต่างกัน ทาให้สามารถเข้าใจโครงสร้างและสถาปัตยกรรมใน
การพัฒนาซอฟต์แวร์ได้
• สัญลักษณ์ที่นามาใช้เป็นมาตรฐานเดียวกันในการวิเคราะห์และ
ออกแบบเชิงวัตถุ

More Related Content

PPT
Uml diagrams
PPT
Uml - An Overview
PPT
Adv Disadv
PDF
UML - Unified Modelling Language
PPTX
Lecture 09 uninformed problem solving
PPT
State transition diagrams
PDF
AI Lesson 08
Uml diagrams
Uml - An Overview
Adv Disadv
UML - Unified Modelling Language
Lecture 09 uninformed problem solving
State transition diagrams
AI Lesson 08

Viewers also liked (20)

DOC
Trab planificacion estrategica
PPTX
Lecture 12 Heuristic Searches
PDF
#Distributor Alat Peraga Sekolah SD/MI. SMP/MTs, SMA/MA, SMK, SLB .021 55702265
PPT
PPTX
Búsqueda en la base de datos. Primer seminario
PPTX
Lecture 23 alpha beta pruning
PDF
Object-Oriented Programming
PPT
Knovio oficial
PPTX
Alpha beta pruning
PPTX
Means end analysis, knowledge in learning
DOCX
Core java tutorial
PPTX
Mafebello
PPTX
Market Share e Floor Share - Shopping Campo Limpo
PDF
Project based learming
PPTX
Teoria del Big Bang Melissa York 1D
PDF
Inheritance and Method Overriding
DOC
research proposal_example
PDF
Three state transition diagram flow chart slides power point
PPT
Heuristic Search
Trab planificacion estrategica
Lecture 12 Heuristic Searches
#Distributor Alat Peraga Sekolah SD/MI. SMP/MTs, SMA/MA, SMK, SLB .021 55702265
Búsqueda en la base de datos. Primer seminario
Lecture 23 alpha beta pruning
Object-Oriented Programming
Knovio oficial
Alpha beta pruning
Means end analysis, knowledge in learning
Core java tutorial
Mafebello
Market Share e Floor Share - Shopping Campo Limpo
Project based learming
Teoria del Big Bang Melissa York 1D
Inheritance and Method Overriding
research proposal_example
Three state transition diagram flow chart slides power point
Heuristic Search
Ad

Similar to The Unified Modelling Lanage (UML) (20)

PPTX
Presentation1
PPTX
Presentation1
PPT
PPT
ภารกิจที่ 4
PPT
228-8 /231-9
PPT
Task004
PPT
System Development Life Cycle S D L C
PPT
System development life cycle sdlc
PPTX
Activitiy-4
PPTX
Activity 4
PPTX
Activity 4
PPTX
PPTX
การพัฒนา Software
PPT
PPT
การพัฒนาซอฟแวร์
PPT
Activity 4
Presentation1
Presentation1
ภารกิจที่ 4
228-8 /231-9
Task004
System Development Life Cycle S D L C
System development life cycle sdlc
Activitiy-4
Activity 4
Activity 4
การพัฒนา Software
การพัฒนาซอฟแวร์
Activity 4
Ad

More from CC Nakhon Pathom Rajabhat University (20)

PDF
ภาษา java sript
PDF
การสร้่างเว็บด้วยภาษา html
PDF
หลักการออกแบบเว็บไซต์
PDF
ปฏิบัติการการพัฒนาออกแบบและการเขียนโปรแกรมเว็บเพจ
PDF
การนำระบบไปใช้/การบำรุงรักษาระบบ
PDF
การออกแบบระบบและการออกแบบยูสเซอร์อินเตอร์เฟซ
PDF
การออกแบบเอาต์พุต/การออกแบบอินพุต
PDF
PDF
แบบจำลองระบบ
PDF
การวิเคราะห์ระบบ 2
PDF
การวิเคราะห์ระบบ 1
PDF
การพัฒนาระบบสารสนเทศและวัฏจักรการพัฒนาระบบสารสนเทศ
PDF
ความรู้เบื้องต้นเกี่ยวกับการวิเคราะห์ระบบ
PDF
ความรู้เบื้องต้นเกี่ยวกับระบบสารสนเทศ
PDF
บทที่7 การประยุกต์ใช้ในงานทางด้านโยธา
ภาษา java sript
การสร้่างเว็บด้วยภาษา html
หลักการออกแบบเว็บไซต์
ปฏิบัติการการพัฒนาออกแบบและการเขียนโปรแกรมเว็บเพจ
การนำระบบไปใช้/การบำรุงรักษาระบบ
การออกแบบระบบและการออกแบบยูสเซอร์อินเตอร์เฟซ
การออกแบบเอาต์พุต/การออกแบบอินพุต
แบบจำลองระบบ
การวิเคราะห์ระบบ 2
การวิเคราะห์ระบบ 1
การพัฒนาระบบสารสนเทศและวัฏจักรการพัฒนาระบบสารสนเทศ
ความรู้เบื้องต้นเกี่ยวกับการวิเคราะห์ระบบ
ความรู้เบื้องต้นเกี่ยวกับระบบสารสนเทศ
บทที่7 การประยุกต์ใช้ในงานทางด้านโยธา

The Unified Modelling Lanage (UML)

  • 1. The Unified Modelling Language (UML) อาจารย์สมเกียรติ ช่อเหมือน (tkorinp@hotmail.com) สาขาวิชาวิศวกรรมซอฟต์แวร์ คณะวิทยาศาสตร์และเทคโนโลยี
  • 2. The Unified Modelling Language (UML) • An introduction to UML UML Class Diagrams UML Syntax UML Package Diagrams UML Object diagrams UML Sequence Diagrams
  • 3. UML (Unified Modelling Language) • การสร้างแบบจาลองซอฟต์แวร์ ในรูปของสัญลักษณ์ • เพื่อใช้ในการอธิบายระเบียบวิธีการ • เข้าใจลาดับขั้นตอนในการทางานให้บรรลุผล • จัดลาดับของกิจกรรมเพื่อรวบรวมความต้องการของผู้ใช้ • กระบวนการเขียน Diagram โดยใช้ สัญลักษณ์ในการออกแบบซอฟต์แวร์ นาเสนอ และตกลงร่วมกัน • ใช้แผนภาพประกอบเพื่อช่วยให้เข้าใจได้ง่าย และอธิบายข้อมูลทางเทคนิคให้ ถูกต้องตรงกันและชัดเจนขึ้น • นาไปใช้ในกระบวนต่อไปของการพัฒนาซอฟต์แวร์ได้ • ไม่ใช้วิธีการ แต่เป็นสิ่งที่นาไปใช้ช่วยให้สามารถออกแบบและนาไปใช้ได้อย่าง ถูกต้อง ด้วยการสร้างแผนภาพ เพื่อเป็นแนวทางที่เหมาะสมตามความต้องการ
  • 4. Class diagrams • แผนภาพพื้นฐานของแนวคิดเชิงวัตถุ • แสดงรายละเอียดของสิ่งต่างๆ • แสดงความเกี่ยวข้องของสิ่งต่างๆ • แสดงสถาปัตยกรรมของระบบ
  • 5. Class diagrams • Class ชั้นประกอบด้วย – ชื่อไม่ซ้ากัน (*ขึ้นต้นด้วยตัวพิมพ์ใหญ่) – รายการแอตทริบิวต์ – รายการของวิธีการ • การมองเห็นและการเข้าถึงจากภายนอก (visibility modifiers) – private Attributes – public methods • ทราบถึงข้อมูลที่สนใจและสามารถตัดส่วนที่ไม่สนใจออกได้ • บาง Class จะเรียกใช้งาน Classอื่น ๆ • ความสัมพันธ์เหล่านี้จะแสดงโดยลูกศร
  • 6. Class diagrams • Classes – - attributes – - operations – - visibility • Relationships – - navigability – - multiplicity – - dependency – - aggregation – - composition • Generalization / specialization – - inheritance – - interfaces • Keywords • Notes and Comments
  • 7. UML Syntax • Visibility ‘+’ public ‘-’ private ‘#’ protected ‘~’ package • Multiplicity is one ‘n’ exactly n ‘*’ zero or more ‘m..‘n’ between m and n
  • 8. UML Syntax • Visibility ‘+’ public ‘-’ private ‘#’ protected ‘~’ package • Multiplicity is one ‘n’ exactly n ‘*’ zero or more ‘m..‘n’ between m and n
  • 9. Examples of attributes • visibility name (par1 : type1, par2 : type2): returntype - custRef : int [1] # itemCodes : String [1..*] validCard : boolean
  • 10. Examples of method • + addName (newName : String) : boolean
  • 11. relationships between classes • ‘Association’ multiplicity ‘source’ class points to the ‘target’
  • 12. Relationships between classes • The diagram below shows this information • All class names begin in uppercase • attribute and method names begin in lowercase. • class ItemForSale describes a single item • ‘listOfItems’ list of zero or more individual objects
  • 13. Types of Association • Dependency • Simple association • Bidirectional association • Aggregation and • Composition
  • 14. Inheritance การ คลาส A สืบทอดมาจากคลาส B
  • 15. Interfaces • implemented by Publication • required by CashTill <<realizes>> “ball and socket” in UML2
  • 16. Notes
  • 17. elements of UML Class Diagram notation
  • 18. elements of UML Class Diagram notation
  • 20. Package Naming • package names are normally in lowercase • local individual projects packages – Mysystem – mysystem.interface – mysystem.engine – mysystem.engine.util – mysystem.database • based on URL
  • 21. Package Diagram • Dependency arrows have been drawn to highlight relationships between packages. When more thought has been put into determining these relationships they may turn out to be associations
  • 22. UML Object Diagrams • objectName : ClassName • attribute = value
  • 24. Sequence Diagrams • Selection and Iteration – The logic of a scenario often depends on selection (‘if’) and iteration (loops). – There is a notation (‘interaction frames’) which allow ifs and loops to be represented in sequence diagrams however these tend to make the diagrams cluttered. – Sequence diagrams are generally best used for illustrating particular cases, with the full refinement reserved for the implementation code.
  • 26. UML
  • 30. สรุป • UML เป็นภาษาที่ใช้กาหนดรายละเอียดโดยใช้โมเดลด้าน ซอฟต์แวร์ เพื่อช่วยให้สามารถทางานร่วมกันได้ โดยยึดรูปแบบที่ วิเคราะห์และออกแบบไว้ร่วมกัน • แผนภาพแต่ละชนิดใช้สาหรับแสดงรายละเอียดของซอฟต์แวร์ แตกต่างกัน ทาให้สามารถเข้าใจโครงสร้างและสถาปัตยกรรมใน การพัฒนาซอฟต์แวร์ได้ • สัญลักษณ์ที่นามาใช้เป็นมาตรฐานเดียวกันในการวิเคราะห์และ ออกแบบเชิงวัตถุ