You are on page 1of 40

CASE TOOLS LAB MANNUAL

Introduction to UML:
UML (Unified Modeling Language) is a language used for visualizing, specifying, constructing and documenting the artifacts of a software intensive system.

Building Blocks of UML:


Things Relationships Diagrams

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 :

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 1

CASE TOOLS LAB MANNUAL


Deployment Diagram

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)

mouseClicked() mousePressed() mouseReleased() mouseEntered() mouseExited()

Collaboration: Use Case:

Place Order

Component: Active Classes:


OrderForm.java

Node:
File Server

Interaction:
BVC COLLEGE OF ENGINEERING, DEPT.OF CSE Page 2

CASE TOOLS LAB MANNUAL

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

Dependency: --------------------------------> Association: _____________________ _ Generalization:

Realization:

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 3

CASE TOOLS LAB MANNUAL

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.

Use case diagram of LMS:


BVC COLLEGE OF ENGINEERING, DEPT.OF CSE Page 4

CASE TOOLS LAB MANNUAL

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 5

CASE TOOLS LAB MANNUAL


B) Aim: implementation of use case diagrams for ATM

Use case diagram of ATM

Week-2
BVC COLLEGE OF ENGINEERING, DEPT.OF CSE Page 6

CASE TOOLS LAB MANNUAL


A) Aim: implementation of class diagram for LMS

Description: Class Diagrams:


Terms and Concepts: A class is a description of a set of objects that share the same attributes, operations, relationships and semantics. Graphically, a class is rendered as a rectangle. Class diagram commonly contains the following things. Classes, Interfaces, Collaboration, Dependency, Generalization and Association, Relationships. Class diagrams may also contain packages or subsystems both of which are used to group elements of your model into layer chunks. Class diagrams are used in one of 3 ways. Modeling the Vocabulary of a System. Modeling the Distribution of Responsibilities in a System. Modeling Non-software Things. Common Modeling Techniques You'll use classes most commonly to model abstractions that are drawn from the problem, you are trying to solve or from the technology you are using to implement a solution to that problem. Each of these abstractions is a part of the vocabulary of your system, meaning that, together, they represent the things that are important to users and to implementers. Modeling Non-software Things To model the vocabulary of a system, Identify those things that users or implementers use to describe the problem or solution. Use CRC cards and use case-based analysis to help find these abstractions. For each abstraction, identify a set of responsibilities. Make sure that each class is crisply defined and that there is a good balance of responsibilities among all your classes. Provide the attributes and operations that are needed to carry out these responsibilities for each class. Modeling the Distribution of Responsibilities in a System To model the distribution of responsibilities in a system,
BVC COLLEGE OF ENGINEERING, DEPT.OF CSE Page 7

CASE TOOLS LAB MANNUAL


Identify a set of classes that work together closely to carry out some behavior. Identify a set of responsibilities for each of these classes.Look at this set of classes as a whole, split classes that have too many responsibilities into smaller abstractions, collapse tiny classes that have trivial responsibilities into larger ones, and reallocate responsibilities so that each abstraction reasonably stands on its own. Consider the ways in which those classes collaborate with one another, and redistribute their responsibilities accordingly so that no class within a collaboration does too much or too little.

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.

Class Diagram of LMS:

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 8

CASE TOOLS LAB MANNUAL

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 9

CASE TOOLS LAB MANNUAL

B) Aim: implementation of class diagram for ATM

Class Diaram of ATM :

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 10

CASE TOOLS LAB MANNUAL


Week-3 A) Aim: Implementation of Description: Interaction Diagrams:
Terms and Concepts: An interaction is a behavior that comprises a set of messages exchanged among a set of Objects within a context to accomplish a purpose. A message is a specification of a communication between objects that conveys information with the expectation that activity will ensue. A sequence diagram is an interaction diagram that emphasizes the time ordering of messages. A collaboration diagram is an interaction diagram that emphasizes the structural organization of the objects that send and receive messages. Interaction diagrams commonly contain Objects Links Messages Interaction diagrams are used in two ways: Modeling a Flow of Control Modeling Flows of Control by Time Ordering To model a flow of control, Set the context for the interaction, whether it is the system as a whole, a class, or an individual operation. Set the stage for the interaction by identifying which objects play a role; set their initial properties, including their attribute values, state, and role. If your model emphasizes the structural organization of these objects, identify the links that connect them, relevant to the paths of communication that take place in this interaction. Specify the nature of the links using the UML's standard stereotypes and constraints, as necessary. In time order, specify the messages that pass from object to object. As necessary, distinguish the different kinds of messages; include parameters and return values to convey the necessary detail of this interaction. Also to convey the necessary detail of this interaction, adorn each object at every moment in time with its state and role. sequence diagrams and collaboration diagrams for LMS Use case scenarios.

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 11

CASE TOOLS LAB MANNUAL

Sequence Diagrams and Collaboration Diagrams of LMS:


Add Member use case successful scenario:

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 12

CASE TOOLS LAB MANNUAL

Check in use case unsuccessful scenario:

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 13

CASE TOOLS LAB MANNUAL

Delete book use case successful scenario:

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 14

CASE TOOLS LAB MANNUAL

Add book use case successful scenario:

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 15

CASE TOOLS LAB MANNUAL

B) Aim: Implementation of

sequence diagrams and collaboration diagrams for ATM Use case scenarios.

Sequence Diagrams and Collaboration Diagrams of ATM:


Money transfer use case successful scenario:

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 16

CASE TOOLS LAB MANNUAL

Withdrawal-usecase-successful-scenario:

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 17

CASE TOOLS LAB MANNUAL

Deposit use case successful scenario:

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 18

CASE TOOLS LAB MANNUAL


Week-4 A) Aim: Implementation of activity diagrams for LMS Use cases.
Description: Activity diagram Terms and Concepts The activity diagram is typically used to describe the activities performed in a general process workflow, though it can also be used to describe other activity flows, such as a use case or a detailed control flow. The activity diagram consists of actions, which are the basic unit of behavior that make up an activity. Activity diagrams have a number of features to show control flows, using tokens as a way of displaying flow through a system. Activity diagrams can use these flow control mechanisms to show the response to triggers from external events or from a predetermined milestone, such as a point in time. Actions encompass calling another operation, sending a signal, creating or destroying an object, or some pure computation, such as evaluating an expression. Graphically, an activity diagram is a collection of vertices and arcs. Activity diagrams commonly contain Activity states and action states Transitions Objects

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.

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 19

CASE TOOLS LAB MANNUAL


Object Flow:
Object flow refers to the creation and modification of objects by activities. An object flow arrow from an action to an object means that the action creates or influences the object. An object flow arrow from an object to an action indicates that the action state uses the object.

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

CASE TOOLS LAB MANNUAL


Swimlanes group related activities into one column

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.

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 21

CASE TOOLS LAB MANNUAL

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.

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 22

CASE TOOLS LAB MANNUAL


Activity Diagram of LMS Check out use case

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 23

CASE TOOLS LAB MANNUAL

Activity Diagram of LMS Check in use case with swimlanes

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 24

CASE TOOLS LAB MANNUAL

Activity Diagram of LMS Delete Book use case

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 25

CASE TOOLS LAB MANNUAL

Activity Diagrams of LMS Add Book use case add Add Member use case

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 26

CASE TOOLS LAB MANNUAL

B) Aim: Implementation of activity diagrams for ATM Use cases.


Activity diagram of ATM Money Transfer Use Case

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 27

CASE TOOLS LAB MANNUAL

Activity diagram of ATM Withdrawal use case with Swimlanes

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 28

CASE TOOLS LAB MANNUAL

Activity diagram of ATM Deposit use case

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 29

CASE TOOLS LAB MANNUAL


Week-5
Aim: Implementation of State Chart diagrams for LMS Description: State Chart Diagram State Chart: A state chart diagram can be used to describe the behavior of an object. It is a graph of states as nodes and state transitions as directed edges. A state is displayed as rectangle, an edge as arrow. A node is labeled with the state name inside the bounds. It may also be divided in two areas where the first contains the name and the other an activity in process while in this state, the start state, is a little empty circle. An end state is a double bordered circle. State diagrams can be nested hierarchically, indicating sub state machines. Entering a sub state machine begins at starting state of the sub machine .reaching an end state means leaving a sub state. Initial state: A condition at the beginning of the life of an object or an interaction during which it satisfies some condition, performs some action, or waits for some event.

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

CASE TOOLS LAB MANNUAL


When a transition to a super state occurs, a History Indicator shows control resumes at the state within the super state that was current when the super state was interrupted.

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.

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 31

CASE TOOLS LAB MANNUAL

State-Chart-Diagram-of-LMS:

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 32

CASE TOOLS LAB MANNUAL

Aim: Implementation of State Chart diagrams for ATM

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 33

CASE TOOLS LAB MANNUAL

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 34

CASE TOOLS LAB MANNUAL Week-6


Aim: Implementation of Component Diagram for LMS Description: Component Diagram They show the dependencies of implementation components. A component diagram is a graph of components connected through edges representing simple dependency, containment and implementation relationships. A component diagram describes the organization of the physical components in a system. Basic Component Diagram Symbols and Notations Component: A component is a physical building block of the system. It is represented as a rectangle with tabs.

Interface: An interface describes a group of operations used or created by components. Dependencies: Draw dependencies among components using dashed arrows.

Component Diagram of LMS


BVC COLLEGE OF ENGINEERING, DEPT.OF CSE Page 35

CASE TOOLS LAB MANNUAL

Aim:Implementation of Component Diagram for ATM


Component-Diagram-of-ATM:

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 36

CASE TOOLS LAB MANNUAL

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.

Association: Association refers to a physical connection between nodes, such as Ethernet.

Components and Nodes: Place components inside the node that deploys them.
BVC COLLEGE OF ENGINEERING, DEPT.OF CSE Page 37

CASE TOOLS LAB MANNUAL

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.

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 38

CASE TOOLS LAB MANNUAL


Deployment Diagram of LMS:

Aim: Implementation of Deployment diagram for ATM Deployment Diagram of ATM:

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 39

CASE TOOLS LAB MANNUAL

BVC COLLEGE OF ENGINEERING, DEPT.OF CSE

Page 40

You might also like