UML CLASS DIAGRAMS
ARE AWESOME
THEY’RE SIMPLE
AND EASY TO MAKE
ALL YOU NEED ARE
RECTANGLES AND ARROWS
UP TO 3 RECTANGLES
CAN REPRESENT A CLASS
PUT YOUR CLASS NAME
IN THE FIRST RECTANGLE
MyClass
YOUR VARIABLES
IN THE SECOND RECTANGLE
MyClass
myVariable: String
AND YOUR METHODS
IN THE THIRD RECTANGLE
MyClass
myMethod(): String
myVariable: String
YOU CAN ASSOCIATE
A CLASS TO ANOTHER
WITH A DASHED OPEN ARROW
MyClass
myVariable: MyOtherClass
myMethod(): String
MyOtherC...
YOU CAN
INHERIT
FROM A CLASS
WITH A CLOSED
ARROW
MyChild
myVariable: String
myMethod()
MyParent
myMethod()
DO YOU
REALLY NEED
TO INHERIT
FROM A CLASS?
!
REALLY?
CAN’T YOU JUST USE AN
ASSOCIATION INSTEAD?
ALWAYS FAVOR
ASSOCIATION
OVER
INHERITANCE
BUT WHEN YOU DO USE
INHERITANCE, REMEMBER…
THE RELATION IS NOT “IS A”
BUT “CAN REPLACE”
DON’T USE POLYMORPHISM
TO CHANGE STRUCTURE!
USE IT TO CHANGE BEHAVIOR
WITH GREAT POWER
COMES GREAT
RESPONSIBILITIES
GREAT UML
CLASS DIAGRAMS …
ARE SHORT
THEY COMMUNICATE
A SINGLE
AND IMPORTANT
CONCEPT
THEY ARE NOT DETAILED
PROGRAMMING
INSTRUCTIONS
WORRY ABOUT
COMMUNICATION
LET THE PROGRAMMER
FILL IN THE DETAILS
ALWAYS INCLUDE A LITTLE TEXT
EXPLAINING WHAT YOU WANT
TO COMMUNICATE
AND ALWAYS KEEP IN MIND…
UML DOES NOT COMPILE
UML DOES NOT CRASH
GOOD LUCK
MODELLING SOFTWARE
Upcoming SlideShare
Loading in …5
×

UML Class Diagrams are Awesome

694 views

Published on

UML Class Diagrams are Awesome

Published in: Software
1 Comment
3 Likes
Statistics
Notes
No Downloads
Views
Total views
694
On SlideShare
0
From Embeds
0
Number of Embeds
13
Actions
Shares
0
Downloads
35
Comments
1
Likes
3
Embeds 0
No embeds

No notes for slide

UML Class Diagrams are Awesome

  1. 1. UML CLASS DIAGRAMS ARE AWESOME
  2. 2. THEY’RE SIMPLE AND EASY TO MAKE
  3. 3. ALL YOU NEED ARE RECTANGLES AND ARROWS
  4. 4. UP TO 3 RECTANGLES CAN REPRESENT A CLASS
  5. 5. PUT YOUR CLASS NAME IN THE FIRST RECTANGLE MyClass
  6. 6. YOUR VARIABLES IN THE SECOND RECTANGLE MyClass myVariable: String
  7. 7. AND YOUR METHODS IN THE THIRD RECTANGLE MyClass myMethod(): String myVariable: String
  8. 8. YOU CAN ASSOCIATE A CLASS TO ANOTHER WITH A DASHED OPEN ARROW MyClass myVariable: MyOtherClass myMethod(): String MyOtherClass myVariable: String anotherMethod() << uses >>
  9. 9. YOU CAN INHERIT FROM A CLASS WITH A CLOSED ARROW MyChild myVariable: String myMethod() MyParent myMethod()
  10. 10. DO YOU REALLY NEED TO INHERIT FROM A CLASS?
  11. 11. ! REALLY?
  12. 12. CAN’T YOU JUST USE AN ASSOCIATION INSTEAD?
  13. 13. ALWAYS FAVOR ASSOCIATION OVER INHERITANCE
  14. 14. BUT WHEN YOU DO USE INHERITANCE, REMEMBER…
  15. 15. THE RELATION IS NOT “IS A” BUT “CAN REPLACE”
  16. 16. DON’T USE POLYMORPHISM TO CHANGE STRUCTURE! USE IT TO CHANGE BEHAVIOR
  17. 17. WITH GREAT POWER COMES GREAT RESPONSIBILITIES
  18. 18. GREAT UML CLASS DIAGRAMS …
  19. 19. ARE SHORT
  20. 20. THEY COMMUNICATE A SINGLE AND IMPORTANT CONCEPT
  21. 21. THEY ARE NOT DETAILED PROGRAMMING INSTRUCTIONS
  22. 22. WORRY ABOUT COMMUNICATION LET THE PROGRAMMER FILL IN THE DETAILS
  23. 23. ALWAYS INCLUDE A LITTLE TEXT EXPLAINING WHAT YOU WANT TO COMMUNICATE
  24. 24. AND ALWAYS KEEP IN MIND…
  25. 25. UML DOES NOT COMPILE
  26. 26. UML DOES NOT CRASH
  27. 27. GOOD LUCK MODELLING SOFTWARE

×