SlideShare uma empresa Scribd logo
1 de 31
Baixar para ler offline
1
2
 The class diagram is a static model that shows the
classes and the relationships among classes in the
system.
 Class diagrams illustrates classes, interfaces, and their
associations. They are used for static object modeling.
 A Class diagram gives an overview of a system by
showing its classes and the relationships among them.
 Class diagrams display what interacts but not what
happens when they do interact
3
 The main building block of a class diagram is the class,
which stores and manages information in the system.
 A blueprint that an object made from.
 The class contains two major parts:
• Attributes “data members”.
• Operations “method members”.
4
No arrows; info can
flow in both directions
Aggregation – Order class
contains OrderDetail classes.
Could be composition?
5
6
7
8
9
 Class diagrams are great for:
 discovering related data and attributes
 getting a quick picture of the important entities in a system
 seeing whether you have too few/many classes
 seeing whether the relationships between objects are too
complex, too many in number, simple enough, etc.
 spotting dependencies between one class/object and another
 Not so great for:
 discovering algorithmic (not data-driven) behavior
 finding the flow of steps for objects to solve a given problem
 understanding the app's overall control flow (event-driven? web-
based? sequential? etc.)
10
11
 Draw a class diagram for a information modeling system
for a school.
 School has one or more Departments.
 Department offers one or more Subjects.
 A particular subject will be offered by only one
department.
 Department has instructors and instructors can work
for one or more departments.
 Student can enrol in upto 5 subjects in a School.
 Instructors can teach upto 3 subjects.
 The same subject can be taught by different
instructors.
 Students can be enrolled in more than one school.
12
 School has one or more Departments.
School Department
has1 1..*
 Department offers one or more Subjects.
 A particular subject will be offered by only one department.
Department Subject
offers1 1..*
13
 Department has Instructors and instructors can work
for one or more departments.
assigned to1..*
Instructor Department
1..*
 Student can enrol in upto 5 Subjects.
Student Subject
takes* 0..5
14
 Instructors can teach up to 3 subjects.
 The same subject can be taught by different
instructors.
Instructor Subjects
teaches
1..*
1..3
15
 Students can be enrolled in more than one school.
Student School
member
*
1..*
16
School Department
Student Subject Instructor
1…*
*
member
* 1..5
attends
1..3 1..*
teaches
1..*
1
1 1..*
has
1..*
1..*
assignedTo
offeres
17
 Object Diagram shows the relationship between objects.
 Unlike classes objects have a state.
18
c1: Company
d2: Departmentd1: Department
name=“Sales” name=”CSSE”
p1: Persont
name=“Rao”
p2: Person
name=“Raj”
manager employee
c1: Company
name=“UniMelb”
19
20
21
22
23
24
25
26
27
28
29
30
31

Mais conteúdo relacionado

Mais procurados

Uml deployment diagram
Uml deployment diagramUml deployment diagram
Uml deployment diagram
Asraa Batool
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
mewaseem
 

Mais procurados (20)

Use case Diagram
Use case Diagram Use case Diagram
Use case Diagram
 
Class diagrams
Class diagramsClass diagrams
Class diagrams
 
Uml class-diagram
Uml class-diagramUml class-diagram
Uml class-diagram
 
Uml deployment diagram
Uml deployment diagramUml deployment diagram
Uml deployment diagram
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 
UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...
UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...
UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...
 
Task programming
Task programmingTask programming
Task programming
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 
Interaction Modeling
Interaction ModelingInteraction Modeling
Interaction Modeling
 
Use Case Modeling
Use Case ModelingUse Case Modeling
Use Case Modeling
 
11 deployment diagrams
11 deployment diagrams11 deployment diagrams
11 deployment diagrams
 
Software process
Software processSoftware process
Software process
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
 
Component and Deployment Diagram - Brief Overview
Component and Deployment Diagram - Brief OverviewComponent and Deployment Diagram - Brief Overview
Component and Deployment Diagram - Brief Overview
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
Use Case Diagram
Use Case DiagramUse Case Diagram
Use Case Diagram
 
Lecture11 use case sequence diagram
Lecture11 use case sequence diagramLecture11 use case sequence diagram
Lecture11 use case sequence diagram
 
Object modeling
Object modelingObject modeling
Object modeling
 
UML
UMLUML
UML
 

Destaque

Analisis Statistika
Analisis StatistikaAnalisis Statistika
Analisis Statistika
Dian Arisona
 
Analysis optimization and monitoring system
Analysis optimization and monitoring system Analysis optimization and monitoring system
Analysis optimization and monitoring system
slmnsvn
 

Destaque (20)

Uml class Diagram
Uml class DiagramUml class Diagram
Uml class Diagram
 
class diagram
class diagramclass diagram
class diagram
 
Uml class diagram and packages ppt for dot net
Uml class diagram and packages ppt for dot netUml class diagram and packages ppt for dot net
Uml class diagram and packages ppt for dot net
 
Smith Chart
Smith ChartSmith Chart
Smith Chart
 
UML basic - Class Diagram
UML basic - Class DiagramUML basic - Class Diagram
UML basic - Class Diagram
 
Analisis Statistika
Analisis StatistikaAnalisis Statistika
Analisis Statistika
 
Ooadb
OoadbOoadb
Ooadb
 
Analysis optimization and monitoring system
Analysis optimization and monitoring system Analysis optimization and monitoring system
Analysis optimization and monitoring system
 
UML TUTORIALS
UML TUTORIALSUML TUTORIALS
UML TUTORIALS
 
Unit 1- OOAD ppt
Unit 1- OOAD  pptUnit 1- OOAD  ppt
Unit 1- OOAD ppt
 
Dsp foehu lec 01 - signals and systems
Dsp foehu   lec 01 - signals and systemsDsp foehu   lec 01 - signals and systems
Dsp foehu lec 01 - signals and systems
 
SE_Lec 02_Software Life Cycle Models
SE_Lec 02_Software Life Cycle ModelsSE_Lec 02_Software Life Cycle Models
SE_Lec 02_Software Life Cycle Models
 
SE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour DiagramsSE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour Diagrams
 
SE_Lec 01_ Introduction to Software Enginerring
SE_Lec 01_ Introduction to Software EnginerringSE_Lec 01_ Introduction to Software Enginerring
SE_Lec 01_ Introduction to Software Enginerring
 
SE_Lec 08_UML Use Cases
SE_Lec 08_UML Use CasesSE_Lec 08_UML Use Cases
SE_Lec 08_UML Use Cases
 
SE_Lec 00_ Software Engineering 1
SE_Lec 00_ Software Engineering 1SE_Lec 00_ Software Engineering 1
SE_Lec 00_ Software Engineering 1
 
SE_Lec 03_Requirements Analysis and Specification
SE_Lec 03_Requirements Analysis and SpecificationSE_Lec 03_Requirements Analysis and Specification
SE_Lec 03_Requirements Analysis and Specification
 
SE_Lec 04_Agile Software Development
SE_Lec 04_Agile Software DevelopmentSE_Lec 04_Agile Software Development
SE_Lec 04_Agile Software Development
 
Uml report
Uml reportUml report
Uml report
 
DSP_FOEHU - Lec 02 - Frequency Domain Analysis of Signals and Systems
DSP_FOEHU - Lec 02 - Frequency Domain Analysis of Signals and SystemsDSP_FOEHU - Lec 02 - Frequency Domain Analysis of Signals and Systems
DSP_FOEHU - Lec 02 - Frequency Domain Analysis of Signals and Systems
 

Semelhante a SE_Lec 07_UML CLASS DIAGRAM

08 class and sequence diagrams
08   class and sequence diagrams08   class and sequence diagrams
08 class and sequence diagrams
kebsterz
 
Slide 5 Class Diagram
Slide 5 Class DiagramSlide 5 Class Diagram
Slide 5 Class Diagram
Niloy Rocker
 

Semelhante a SE_Lec 07_UML CLASS DIAGRAM (20)

SE18_Lec 08_UML Class Diagram
SE18_Lec 08_UML Class DiagramSE18_Lec 08_UML Class Diagram
SE18_Lec 08_UML Class Diagram
 
Fundamentals of Database Management Systems 2nd Edition Gillenson Solutions M...
Fundamentals of Database Management Systems 2nd Edition Gillenson Solutions M...Fundamentals of Database Management Systems 2nd Edition Gillenson Solutions M...
Fundamentals of Database Management Systems 2nd Edition Gillenson Solutions M...
 
DBMS-7.pptx
DBMS-7.pptxDBMS-7.pptx
DBMS-7.pptx
 
DBMS-2.pptx
DBMS-2.pptxDBMS-2.pptx
DBMS-2.pptx
 
SAD02 - Object Orientation
SAD02 - Object OrientationSAD02 - Object Orientation
SAD02 - Object Orientation
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manual
 
06 class diagrams
06 class diagrams06 class diagrams
06 class diagrams
 
UNIT II DBMS.pptx
UNIT II DBMS.pptxUNIT II DBMS.pptx
UNIT II DBMS.pptx
 
OOP_Module 2.pptx
OOP_Module 2.pptxOOP_Module 2.pptx
OOP_Module 2.pptx
 
AICS_2016_paper_9
AICS_2016_paper_9AICS_2016_paper_9
AICS_2016_paper_9
 
08 class and sequence diagrams
08   class and sequence diagrams08   class and sequence diagrams
08 class and sequence diagrams
 
Unit-1-DBMS-SUN-4 everything you need to know.pptx
Unit-1-DBMS-SUN-4 everything you need to know.pptxUnit-1-DBMS-SUN-4 everything you need to know.pptx
Unit-1-DBMS-SUN-4 everything you need to know.pptx
 
DISE - OOAD Using UML
DISE - OOAD Using UMLDISE - OOAD Using UML
DISE - OOAD Using UML
 
SE_Lec 06_Object Oriented Analysis and Design
SE_Lec 06_Object Oriented Analysis and DesignSE_Lec 06_Object Oriented Analysis and Design
SE_Lec 06_Object Oriented Analysis and Design
 
Slide 5 Class Diagram
Slide 5 Class DiagramSlide 5 Class Diagram
Slide 5 Class Diagram
 
SE18_Lec 06_Object Oriented Analysis and Design
SE18_Lec 06_Object Oriented Analysis and DesignSE18_Lec 06_Object Oriented Analysis and Design
SE18_Lec 06_Object Oriented Analysis and Design
 
UML diagrams and symbols
UML diagrams and symbolsUML diagrams and symbols
UML diagrams and symbols
 
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
 
UML-class diagram for beginners to adance.ppt
UML-class diagram for beginners to adance.pptUML-class diagram for beginners to adance.ppt
UML-class diagram for beginners to adance.ppt
 
UML-class_diagram.ppt
UML-class_diagram.pptUML-class_diagram.ppt
UML-class_diagram.ppt
 

Mais de Amr E. Mohamed

Mais de Amr E. Mohamed (20)

Dsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processingDsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processing
 
Dcs lec03 - z-analysis of discrete time control systems
Dcs   lec03 - z-analysis of discrete time control systemsDcs   lec03 - z-analysis of discrete time control systems
Dcs lec03 - z-analysis of discrete time control systems
 
Dcs lec02 - z-transform
Dcs   lec02 - z-transformDcs   lec02 - z-transform
Dcs lec02 - z-transform
 
Dcs lec01 - introduction to discrete-time control systems
Dcs   lec01 - introduction to discrete-time control systemsDcs   lec01 - introduction to discrete-time control systems
Dcs lec01 - introduction to discrete-time control systems
 
DDSP_2018_FOEHU - Lec 10 - Digital Signal Processing Applications
DDSP_2018_FOEHU - Lec 10 - Digital Signal Processing ApplicationsDDSP_2018_FOEHU - Lec 10 - Digital Signal Processing Applications
DDSP_2018_FOEHU - Lec 10 - Digital Signal Processing Applications
 
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter DesignDSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
 
DSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter DesignDSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter Design
 
SE2018_Lec 17_ Coding
SE2018_Lec 17_ CodingSE2018_Lec 17_ Coding
SE2018_Lec 17_ Coding
 
SE2018_Lec-22_-Continuous-Integration-Tools
SE2018_Lec-22_-Continuous-Integration-ToolsSE2018_Lec-22_-Continuous-Integration-Tools
SE2018_Lec-22_-Continuous-Integration-Tools
 
SE2018_Lec 21_ Software Configuration Management (SCM)
SE2018_Lec 21_ Software Configuration Management (SCM)SE2018_Lec 21_ Software Configuration Management (SCM)
SE2018_Lec 21_ Software Configuration Management (SCM)
 
SE2018_Lec 18_ Design Principles and Design Patterns
SE2018_Lec 18_ Design Principles and Design PatternsSE2018_Lec 18_ Design Principles and Design Patterns
SE2018_Lec 18_ Design Principles and Design Patterns
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 
SE2018_Lec 20_ Test-Driven Development (TDD)
SE2018_Lec 20_ Test-Driven Development (TDD)SE2018_Lec 20_ Test-Driven Development (TDD)
SE2018_Lec 20_ Test-Driven Development (TDD)
 
SE2018_Lec 19_ Software Testing
SE2018_Lec 19_ Software TestingSE2018_Lec 19_ Software Testing
SE2018_Lec 19_ Software Testing
 
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
 
DSP_2018_FOEHU - Lec 05 - Digital Filters
DSP_2018_FOEHU - Lec 05 - Digital FiltersDSP_2018_FOEHU - Lec 05 - Digital Filters
DSP_2018_FOEHU - Lec 05 - Digital Filters
 
DSP_2018_FOEHU - Lec 04 - The z-Transform
DSP_2018_FOEHU - Lec 04 - The z-TransformDSP_2018_FOEHU - Lec 04 - The z-Transform
DSP_2018_FOEHU - Lec 04 - The z-Transform
 
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and SystemsDSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
 
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time SignalsDSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
 
SE2018_Lec 15_ Software Design
SE2018_Lec 15_ Software DesignSE2018_Lec 15_ Software Design
SE2018_Lec 15_ Software Design
 

Último

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
anilsa9823
 

Último (20)

HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 

SE_Lec 07_UML CLASS DIAGRAM

  • 1. 1
  • 2. 2  The class diagram is a static model that shows the classes and the relationships among classes in the system.  Class diagrams illustrates classes, interfaces, and their associations. They are used for static object modeling.  A Class diagram gives an overview of a system by showing its classes and the relationships among them.  Class diagrams display what interacts but not what happens when they do interact
  • 3. 3  The main building block of a class diagram is the class, which stores and manages information in the system.  A blueprint that an object made from.  The class contains two major parts: • Attributes “data members”. • Operations “method members”.
  • 4. 4 No arrows; info can flow in both directions Aggregation – Order class contains OrderDetail classes. Could be composition?
  • 5. 5
  • 6. 6
  • 7. 7
  • 8. 8
  • 9. 9  Class diagrams are great for:  discovering related data and attributes  getting a quick picture of the important entities in a system  seeing whether you have too few/many classes  seeing whether the relationships between objects are too complex, too many in number, simple enough, etc.  spotting dependencies between one class/object and another  Not so great for:  discovering algorithmic (not data-driven) behavior  finding the flow of steps for objects to solve a given problem  understanding the app's overall control flow (event-driven? web- based? sequential? etc.)
  • 10. 10
  • 11. 11  Draw a class diagram for a information modeling system for a school.  School has one or more Departments.  Department offers one or more Subjects.  A particular subject will be offered by only one department.  Department has instructors and instructors can work for one or more departments.  Student can enrol in upto 5 subjects in a School.  Instructors can teach upto 3 subjects.  The same subject can be taught by different instructors.  Students can be enrolled in more than one school.
  • 12. 12  School has one or more Departments. School Department has1 1..*  Department offers one or more Subjects.  A particular subject will be offered by only one department. Department Subject offers1 1..*
  • 13. 13  Department has Instructors and instructors can work for one or more departments. assigned to1..* Instructor Department 1..*  Student can enrol in upto 5 Subjects. Student Subject takes* 0..5
  • 14. 14  Instructors can teach up to 3 subjects.  The same subject can be taught by different instructors. Instructor Subjects teaches 1..* 1..3
  • 15. 15  Students can be enrolled in more than one school. Student School member * 1..*
  • 16. 16 School Department Student Subject Instructor 1…* * member * 1..5 attends 1..3 1..* teaches 1..* 1 1 1..* has 1..* 1..* assignedTo offeres
  • 17. 17  Object Diagram shows the relationship between objects.  Unlike classes objects have a state.
  • 18. 18 c1: Company d2: Departmentd1: Department name=“Sales” name=”CSSE” p1: Persont name=“Rao” p2: Person name=“Raj” manager employee c1: Company name=“UniMelb”
  • 19. 19
  • 20. 20
  • 21. 21
  • 22. 22
  • 23. 23
  • 24. 24
  • 25. 25
  • 26. 26
  • 27. 27
  • 28. 28
  • 29. 29
  • 30. 30
  • 31. 31