Professional Documents
Culture Documents
Introduction to UML:
UML (Unified Modeling Language) is a language used for visualizing, specifying, constructing and documenting the artifacts of a software intensive system.
Things in UML:
Structural things Classes Interfaces Collaborations Use Cases Active Classes Components Node Behavioral things Interactions State machines Grouping things Packages Annotational things Notes
Relationships in UML:
Dependency Association Generalization Realization Class Diagram Object Diagram Use case Diagram Sequence Diagram Collaboration Diagram State chart Diagram Activity Diagram Component Diagram
Diagrams in UML :
Page 1
Interface: Class:
MyFrame height : int = 300 width : int = 400 status : int = 1 title : String = "Demo Frame" MyFrame() : MyFrame open(void) : void close(int status) : void resize(int height, int width) : void minimize(void) : void maxim ize(void) : void
<<Interface>> MouseListener
(from event)
Place Order
Node:
File Server
Interaction:
BVC COLLEGE OF ENGINEERING, DEPT.OF CSE Page 2
State Machine:
Packages:
Grouping things are the organizational parts of UML models. These are the boxes into which a model can be decomposed. In all, there is one primary kind of grouping thing, namely, Packages.
jav a.swing.*
Notes:
Annotational things are the explanatory parts of UML Models. These are the comments you may apply to describe and illuminate about any element in a model.
return copy of s elf
Realization:
Page 3
Week-1 A) Aim: implementation of use case diagrams for LMS Description: Use Case Diagrams:
A use case diagram is a diagram that shows a set of use cases and actors and their relationships. A use case diagram commonly contain Use cases Actors Dependency Generalization and Association Relationships. Use case diagrams may also contain packages, which are used to group elements of your model into larger chants. Use case diagram is used in one of two ways 1) To model the context of a system. 2) To model the requirements of a system. Modeling Techniques: 1. Identity the actors that surround the system by considering which groups require help from the system to perform their tasks, which groups are needed to execute the systems functions; which groups interact with external hardware or other software systems; and which groups perform secondary functions for administration & maintenance. 2.Organize actors that are similar to one another in a generalization/specification hierarchy. 3. Where it aids understandability, provide a stereotype for each such actor. 4. Populate a use case diagram with these actors and specify the paths of communications from each actor to the systems use cases.
Page 5
Week-2
BVC COLLEGE OF ENGINEERING, DEPT.OF CSE Page 6
Modeling Non-software Things To model non-software things, Model the thing you are abstracting as a class. If you want to distinguish these things from the UML's defined building blocks, create a new building block by using stereotypes to specify these new semantics and to give a distinctive visual cue. If the thing you are modeling is some kind of hardware that itself contains software, consider modeling it as a kind of node, as well, so that you can further expand on its structure.
Page 8
Page 9
Page 10
Page 11
Page 12
Page 13
Page 14
Page 15
B) Aim: Implementation of
sequence diagrams and collaboration diagrams for ATM Use case scenarios.
Page 16
Withdrawal-usecase-successful-scenario:
Page 17
Page 18
Action states:
Action states represent the non interruptible actions of objects. You can draw an action state in SmartDraw using a rectangle with rounded corners.
Action Flow: Action flow arrows illustrate the relationships among action states.
Page 19
Initial State:
A filled circle followed by an arrow represents the initial action state.
Final State:
An arrow pointing to a filled circle nested inside another circle represents the final action
Branching:
A diamond represents a decision with alternate paths. The outgoing alternates should be labeled with a condition or guard expression. You can also label one of the paths "else.
Swimlanes:
BVC COLLEGE OF ENGINEERING, DEPT.OF CSE Page 20
Transition:
A transition is a directed relationship between a source state vertex and a target state vertex. It may be part of a compound transition, which takes the state machine from one state configuration to another, representing the complete response of the state machine to a particular event instance. A solid arrow represents the path between different states of an object. Label the transition with the event that triggered it and the action that results from it. A relationship between two states, indicating that an object in the first state will enter the second state and perform certain specified actions when a specified event occurs, if specified conditions are satisfied.
Synchronization: A synchronization bar helps illustrate parallel transitions. Synchronization is also called forking and joining.
Page 21
Decision: The decision button is the diamond on the diagram toolbar. To get the snapshot on the right, we set our Diagram Options to show rectilinear links. Make a decision nodeto compare the number of tickets to the capacity of the airplane. Make a transition from the join to the decision. Then make a transition from the decision to Create reservation and another transition to Refuse request.
Page 22
Page 23
Page 24
Page 25
Activity Diagrams of LMS Add Book use case add Add Member use case
Page 26
Page 27
Page 28
Page 29
Final state: A condition at the end of the life of an object or an interaction during which it satisfies some condition, performs some action, or waits for some event.
State: A condition during the life of an object or an interaction during which it satisfies some condition, performs some action, or waits for some event.
History Indicator:
BVC COLLEGE OF ENGINEERING, DEPT.OF CSE Page 30
Transition: A relationship between two states, indicating that an object in the first state will enter the second state and perform certain specified actions when a specified event occurs, if specified conditions are satisfied.
Page 31
State-Chart-Diagram-of-LMS:
Page 32
Page 33
Page 34
Interface: An interface describes a group of operations used or created by components. Dependencies: Draw dependencies among components using dashed arrows.
Page 36
Week-7
Aim: Implementation of Deployment diagram for LMS Description: Deployment Diagram Deployment diagrams depict the physical resources in a system including nodes, components and connections. Basic Deployment Diagram Symbols and Notations Node: A node is a physical resource that executes code components.
Components and Nodes: Place components inside the node that deploys them.
BVC COLLEGE OF ENGINEERING, DEPT.OF CSE Page 37
Relationships:
Dependency: A dependency is a semantic relationship between two things in which a change to one thing may affect the semantics of the other thing. Graphically, a dependency is rendered as a dashed line, possibly directed, and occasionally including a label. Association: An association is a structural relationship that describes a set of links, a link being a connection among objects. Graphically, an association is rendered as a solid line, possibly directed, occasionally including a label, and often containing other adornments.
Page 38
Page 39
Page 40