Search results
Why use UML • Open Standard, Graphical notation for – Specifying, visualizing, constructing, and documenting software systems • Language can be used from general initial design to very specific detailed design across the entire software development lifecycle • Increase understanding/communication of product to customers and developers
To understand the UML, you need to form a conceptual model of the language, and this requires learning three major elements: the UML's basic building blocks, the rules that dictate how those building blocks may be put together, and some common mechanisms that apply throughout the UML.
- 234KB
- 21
Is purely a notation No modelling method associated with it! Was intended as a design notation Has become an industry standard But is primarily promoted by IBM/Rational (who sell lots of UML tools, services) Has a standardized meta-model Use case diagrams Class diagrams Message sequence charts Activity diagrams State Diagrams
Visualizing – UML provides graphical notation which articulates and ambiguously communicates the overall view of the system. Constructing - UML provides the ‘design’ dimension to the models built.
- Big questions
- Design phase
- How do we design classes?
- What is UML?
- Uses for UML
- UML – Unified Modeling Language
- Object diagram (≠ class diagram)
- UML class diagrams
- Diagram of one class
- Comments
- Relationships between classes
- Generalization (inheritance) relationships
- Multiplicity of associations
- types 1
- Composition/aggregation example
- Class diagram example
- Address
- Tools for creating UML diagrams
- Class diagram pros/cons
What is UML? Why should I bother? Do people really use UML? What is a UML class diagram? What kind of information goes into it? How do I create it? When should I create it?
design: specifying the structure of how a software system will be written and function, without actually writing the complete implementation a transition from "what" the system must do, to "how" the system will do it What classes will we need to implement a system that meets our requirements? What fields and methods will each class have? How will t...
class identification from project spec / requirements nouns are potential classes, objects, fields verbs are potential methods or responsibilities of a class CRC card exercises write down classes' names on index cards next to each class, list the following: responsibilities: problems to be solved; short verb phrases collaborators: other classes tha...
UML: pictures of an OO system programming languages are not abstract enough for OO design UML is an open standard; lots of companies use it What is legal UML? a descriptive language: rigid formal syntax (like programming) prescriptive language: shaped by usage and convention it's okay to omit things from UML diagrams if they aren't needed by team/s...
as a sketch: to communicate aspects of system forward design: doing UML before coding backward design: doing UML after coding as documentation often done on whiteboard or paper used to get rough selective ideas as a blueprint: a complete design to be implemented sometimes done with CASE (Computer-Aided Software Engineering) tools as a programming l...
Union of all Modeling Languages Use case diagrams Class diagrams Object diagrams Sequence diagrams Collaboration diagrams Statechart diagrams Activity diagrams Component diagrams Deployment diagrams . Very big, but a nice standard that has been embraced by the industry.
individual objects (heap layout) objectName : type attribute = value lines show field references Class diagram: summary of all possible object diagrams Object diagram example
UML class diagram: a picture of the classes in an OO system their fields and methods connections between the classes that interact or inherit from each other Not represented in a UML class diagram: details of how the classes interact with each other algorithmic details; how a particular behavior is implemented
class name in top of box write < > on top of interfaces' names use italics for an abstract class name attributes (optional) should include all fields of the object operations / methods (optional) may omit trivial (get/set) methods but don't omit any methods from an interface! should not include inherited methods
• represented as a folded note, attached to the appropriate class/method/etc by a dashed line
generalization: an inheritance relationship inheritance between classes interface implementation association: a usage relationship dependency aggregation composition
hierarchies drawn top-down arrows point upward to parent line/arrow styles indicate whether parent is a(n): class: solid line, black arrow abstract class: solid line, white arrow interface: dashed line, white arrow often omit trivial / obvious generalization relationships, such as drawing the Object class as a parent
one-to-one each student must carry exactly one ID card one-to-many one rectangle list can contain many rectangles
aggregation: “is part of” aggregation symbolized by a clear white diamond composition: “is entirely made of” stronger version of aggregation the parts live and die with the whole symbolized by a black diamond dependency: “uses temporarily” symbolized by dotted line often is an implementation detail, not an intrinsic part of that object's state
If the movie theater goes away so does the box office => composition but movies may still exist => aggregation
No arrows; info can flow in both directions Aggregation – Order class contains OrderDetail classes. Could be composition? UML example: people
streetAddress : String city : String state : String zipCode : long toString() : String
Violet (free) http://horstmann.com/violet/ Rational Rose http://www.rational.com/ Visual Paradigm UML Suite (trial) http://www.visual-paradigm.com/ (nearly) direct download link: http://www.visual-paradigm.com/vp/download.jsp?product=vpuml&edition=ce (there are many others, but most are commercial)
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 g...
- 1MB
- 31
Basic UML Class Diagram Notation Navigability - can reach B starting from A A Class Name attributes (member variables) methods (member functions) + public_method() # protected_method() - private_method() Name virtual method() method()
People also ask
What is an example of a graphical notation in UML?
What is a UML class diagram?
What are things in UML?
What are UML rules?
How do I learn UML?
How does UML extensibility work?
most important relationships are dependencies, generalizations, associations, and realizations. Graphically, a relationship is rendered as a path, with different kinds of lines used to distinguish the different relationships. Dependency A dependency is a using relationship, specifying that a change in the specification of