Download presentation
Presentation is loading. Please wait.
Published byGinger Henry Modified over 8 years ago
1
Fundamentals of Software Development 1Slide 1 UML class diagrams: What are they? Unified Modeling Language (UML)Unified Modeling Language (UML) –“A family of graphical notations … that help in describing and designing [object-oriented] software systems” – Martin Fowler –Developed in 1997 to unify the previous object-oriented graphical modeling languages –Now the world-wide standard We focus on UML class diagramsWe focus on UML class diagrams –These show: Relationships between classes in the software systemRelationships between classes in the software system Details of the classesDetails of the classes
2
Fundamentals of Software Development 1Slide 2 A relationships-only UML class diagram Person ManWoman Son Father Daughter Mother PersonAbleToProcreate > 11 ** This diagram might also show which objects are to construct which other objects is-a (by extending a class)is-a (by extending a class) is-a (by implementing an interface)is-a (by implementing an interface) has-ahas-a 1means one *means 0 or more 1.. *means 1 or more 0.. 1means 0 or 1
3
Fundamentals of Software Development 1Slide 3 A relationships-only UML class diagram Exercise: draw arrows to indicate the relationships between these classes in an order-processing system. For example, think of the company as Amazon and the system as Amazon’s system for processing orders from customers. After drawing the arrows, indicate the multiplicities. Instructor: give each student a paper copy of this slide. The example is taken from Martin Fowler’s UML Distilled, 3 rd Edition. Order Line Product Corporate Customer OrderCustomer Personal Customer Employee salesRep is-a (by extending a class) is-a (by implementing an interface) has-a 1means one *means 0 or more 1.. *means 1 or more 0.. 1means 0 or 1 lineItem
4
Fundamentals of Software Development 1Slide 4 One answer to the exercise on the previous slide Exercise: draw arrows to indicate the relationships between these classes in an order- processing system. For example, think of the company as Amazon and the system as Amazon’s system for processing orders from customers. Here is one answer, but not the only possible one! Depends on exactly what you want to model… Order Line Product Corporate Customer OrderCustomer Personal Customer Employee salesRep is-a (by extending a class) is-a (by implementing an interface) has-a 1means one *means 0 or more 1.. *means 1 or more 0.. 1means 0 or 1 lineItem 1 * * 1 1 0..1 * *
5
Fundamentals of Software Development 1Slide 5 UML class diagrams What they areWhat they are –A notation to assist object-oriented design (not just Java) Why use UML?Why use UML? –UML as sketch To figure out a designTo figure out a design To communicate ideas and alternativesTo communicate ideas and alternatives –UML as blueprint To convey the design to the coderTo convey the design to the coder –UML as programming language To generate code automatically from the designTo generate code automatically from the design This is how we (and most people) use UML class diagrams – as a tool to help our thinking
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.