Lab Manual. Object Oriented Analysis And Design. TE(Computer) VI semester

Similar documents
Experiment no 4 Study of Class Diagram in Rational Rose

3. UML Class Diagrams Page 1 of 15

Structured and Object Oriented Analysis and Design

Software Engineering Lab Manual

Solved Question Paper June 2017

BASICS OF UML (PART-2)

UNIT-4 Behavioral Diagrams

7. UML Sequence Diagrams Page 1 of 1

APPENDIX M INTRODUCTION TO THE UML

Software Service Engineering

UML Tutorial. Unified Modeling Language UML Tutorial

Interactions A link message

Chapter 10. Object-Oriented Analysis and Modeling Using the UML. McGraw-Hill/Irwin

Unified Modeling Language

LABORATORY 1 REVISION

UML- a Brief Look UML and the Process

Introduction to Software Engineering. 5. Modeling Objects and Classes

Index. Add Diagram > Sequence Diagram command,

Introducing the UML Eng. Mohammed T. Abo Alroos

Introduction to Software Engineering. ECSE-321 Unit 9 Architectural Design Approaches

SOFTWARE DESIGN COSC 4353 / Dr. Raj Singh

COSC 3351 Software Design. An Introduction to UML (I)

Unified Modeling Language (UML)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) MODEL ANSWER

Practical UML - A Hands-On Introduction for Developers

Class diagrams. Modeling with UML Chapter 2, part 2. Class Diagrams: details. Class diagram for a simple watch

SEEM4570 System Design and Implementation Lecture 11 UML

Test and Measurements System Modeling: Addressing the Root of the Problem

CHAPTER 5 CO:-Sketch component diagram using basic notations 5.1 Component Diagram (4M) Sample Component Diagram 5.2 Deployment Diagram (8M)

Practical UML : A Hands-On Introduction for Developers

Lesson 11. W.C.Udwela Department of Mathematics & Computer Science

UNIT-II Introduction to UML

Vidyalankar. T.Y. Diploma : Sem. VI [IF/CM] Object Oriented Modeling and Design Prelim Question Paper Solution

UNIT 5 - UML STATE DIAGRAMS AND MODELING

For 100% Result Oriented IGNOU Coaching and Project Training Call CPD TM : ,

Introduction To UML PART II State Diagrams

Object-Oriented Systems Analysis and Design Using UML

Chapter 2: The Object-Oriented Design Process

Course "Softwaretechnik" Book Chapter 2 Modeling with UML

History of object-oriented approaches

Basic Structural Modeling. Copyright Joey Paquet,

SEEM4570 System Design and Implementation. Lecture 10 UML

Class diagrams. Modeling with UML Chapter 2, part 2. Class Diagrams: details. Class diagram for a simple watch

VP-UML Quick Start. Last update: October 15, Copyright Visual Paradigm International Ltd.

INTRODUCTION TO UNIFIED MODELING MODEL (UML) & DFD. Slides by: Shree Jaswal

administrivia today UML start design patterns Tuesday, September 28, 2010

SE Assignment III. 1. List and explain primitive symbols used for constructing DFDs. Illustrate the use of these symbols with the help of an example.

Architecture and the UML

Index. : (colon), 80 <<>> (guillemets), 34, 56

Introduction to Software Engineering. 5. Modeling Objects and Classes

Topics. Overview- The UML Functional Model. Structural Model. Behavioral Models. Use Case Diagram (essential and system)

Enterprise Architect. User Guide Series. UML Models. Author: Sparx Systems. Date: 30/06/2017. Version: 1.0 CREATED WITH

user.book Page 45 Friday, April 8, :05 AM Part 2 BASIC STRUCTURAL MODELING

Engineering Design w/embedded Systems

Object Oriented Analysis and Design - Part2(Design)

Meltem Özturan

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

ArchiMate 2.0. Structural Concepts Behavioral Concepts Informational Concepts. Business. Application. Technology

Hippo Software BPMN and UML Training

Lecture 17: (Architecture V)

Software Development Cycle. Unified Modeling Language. Unified Modeling Language. Unified Modeling Language. Unified Modeling Language.

Oral Questions. Unit-1 Concepts. Oral Question/Assignment/Gate Question with Answer

UNIT I. 3. Write a short notes on process view of 4+1 architecture. 4. Why is object-oriented approach superior to procedural approach?

OO Techniques & UML Class Diagrams

Chapter 1: Principles of Programming and Software Engineering

UML REFERENCE SHEETS. 2013, 2014 Michael Marking; all rights reserved, including moral rights. Web site:

Analysis and Design with UML

What is a Class Diagram? A diagram that shows a set of classes, interfaces, and collaborations and their relationships

What is a Class Diagram? Class Diagram. Why do we need Class Diagram? Class - Notation. Class - Semantic 04/11/51

06. Analysis Modeling

Unified Modeling Language (UML)

CS211 Lecture: Modeling Dynamic Behaviors of Systems; Interaction Diagrams and Statecharts Diagrams in UML

COMN 1.1 Reference. Contents. COMN 1.1 Reference 1. Revision 1.1, by Theodore S. Hills, Copyright

CS 451 Software Engineering

UML Unified Modeling Language

A - 1. CS 494 Object-Oriented Analysis & Design. UML Class Models. Overview. Class Model Perspectives (cont d) Developing Class Models

Credit where Credit is Due. Lecture 4: Fundamentals of Object Technology. Goals for this Lecture. Real-World Objects

MechEng SE3 Lecture 7 Domain Modelling

Object Oriented Design. Program Design. Analysis Phase. Part 2. Analysis Design Implementation. Functional Specification

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

SRI VENKATESWARA COLLEGE OF ENGINERRING AND TECHNOLOGY THIRUPACHUR,THIRUVALLUR UNIT I OOAD PART A

Modeling with UML. (1) Use Case Diagram. (2) Class Diagram. (3) Interaction Diagram. (4) State Diagram

Slide 1 Welcome to Fundamentals of Health Workflow Process Analysis and Redesign: Process Mapping: Entity-Relationship Diagrams. This is Lecture e.

1. Introduction to Object Oriented Software Development

S T R U C T U R A L M O D E L I N G ( M O D E L I N G A S Y S T E M ' S L O G I C A L S T R U C T U R E U S I N G C L A S S E S A N D C L A S S D I A

UNIT II. Syllabus. a. An Overview of the UML: Visualizing, Specifying, Constructing, Documenting

IDERA ER/Studio Software Architect Evaluation Guide. Version 16.5/2016+ Published February 2017

Object-Oriented and Classical Software Engineering

Elements of a Class Diagram. Class Diagram

CHAPTER 1. Topic: UML Overview. CHAPTER 1: Topic 1. Topic: UML Overview

12 Tutorial on UML. TIMe TIMe Electronic Textbook

UML Fundamental. OutLine. NetFusion Tech. Co., Ltd. Jack Lee. Use-case diagram Class diagram Sequence diagram

Chapter 5: Structural Modeling

Object Oriented Modeling and Design

Lecture 33 April 4, Unied Modelling Language. ECE155: Engineering Design with Embedded Systems Winter Patrick Lam version 1

Course 3 7 March

Advanced Software Engineering

Chapter No. 2 Class modeling CO:-Sketch Class,object models using fundamental relationships Contents 2.1 Object and Class Concepts (12M) Objects,

Introduction to Software Engineering. 6. Modeling Behaviour

Introduction to UML. Danang Wahyu utomo

Transcription:

Lab Manual Object Oriented Analysis And Design TE(Computer) VI semester

Index Sr. No. Title of Programming Assignment Page No. 1 2 3 4 5 6 7 8 9 10 Study of Use Case Diagram Study of Activity Diagram Study of Class Diagram Study o package diagram Study of Sequence Diagram Study of Collaboration Diagram Study of State chart Diagram Study of Component Diagram Study of Deployment Diagram Study Use Case Realization 3 9 13 19 22 25 28 33 36 42 2

1 Study of Use Case Diagram 3

1. OBJECTIVE Study the Benefits if use case modeling Learn use case diagram: Discovering actors and discovering use cases. Practice use cases diagrams using Rational Rose. 2. REFERENCES www.developer.com The Unified Modeling Language User Guide by Grady Booch Mastering UML with Rational Rose by Wendy Boggs Fundamentals of Rational Rose Student Manual version 2002.05.00 3. PRE REQUISITE: Knowledge of Requirements Document 4. THEORY 4.1 Use Case Diagram The Use case diagram is used to identify the primary elements and processes that form the system. The primary elements are termed as "actors" and the processes are called "use cases." The Use case diagram shows which actors interact with each use case A use case diagram captures the functional aspects of a system. More specifically, it captures the business processes carried out in the system. As you discuss the functionality 4

and processes of the system, you discover significant characteristics of the system that you model in the use case diagram. Due to the simplicity of use case diagrams, and more importantly, because they are short of all technical jargon, use case diagrams are a great storyboard tool for user meetings. Use case diagrams have another important use. Use case diagrams define the requirements of the system being modeled and hence are used to write test scripts for the modeled system. So who should normally be involved in the creation of use cases? Normally, domain experts and business analysts should be involved in writing use cases for a given system. Use cases are created when the requirements of a system need to be captured. Because, at this point no design or development activities are involved, technical experts should not be a part of the team responsible for creating use cases. Their expertise comes in use later in the software life cycle. 4.2 Elements Of A Use Case Diagram Actors Are NOT part of the system they represent anyone or anything that must Interact with the system. Only input information to the system. Only receive information from the system. Both input to and receive information from the system. Represented in UML as a stickman Use Case A sequence of transactions performed by a system that yields a measurable result of values for a particular actor A use case typically represents a major piece of functionality that is complete from beginning to end. A use case must deliver something of value to an actor. 5

Use Case Relationships Between actor and use case. Association / Communication. Arrow can be in either or both directions; arrow indicates who initiates communication. (a) Between use cases (generalization): Uses Where multiple use cases share pieces of same functionality. Extends Optional behavior. Behavior only runs under certain conditions (such as alarm). Several different flows run based on the user s selection. 6

4.3 USE CASE SPECIFICATIONS Name Name of use case Identifier Description Goal Actors Included Use Cases Extended Use Case Preconditions Post conditions Assumptions Frequency Flow Of Event A unique identifier for this use case, e.g. UC10 A couple of sentences or a paragraph describing the basic idea of the use case The business goal of the initiating actor List of actors that participate in the use case Optional, List of use cases that this use case includes Optional, The use case, if any, that this use case extends List the state(s) the system can be in before this use case starts List the state(s) the system can be in when this use case ends Optional, List all assumptions that have been made Approximately how often this use case is realized, e.g., once a week, 500 times a day, etc Basic Flow the normal processing path, aka, the Happy Path Alternative Flow Description of the alternate course Condition 5 EXERCISES 1. Take all use cases from experiments no.2 and draw activity diagram for that using Rational rose. 6 SAMPLE OUTPUT Use case diagram of the given problem 7

7 DELIVERABLE Student should submit the solutions for the previous exercises. Student should draw use case diagrams for given project using Rational Rose. Student should create Use case specifications. 8

2 Study of Activity Diagram 9

1. OBJECTIVE Deeper understanding of UML activity diagrams. Practicing activity diagrams using Rational Rose. In this lab, we will cover the dynamic diagram the Activity diagram. By the end of this article, you will know what an Activity diagram is, what its elements are, and you will be able to create Activity diagrams for your system. 2. REFERENCES www.developer.com The Unified Modeling Language User Guide by Grady Booch Mastering UML with Rational Rose by Wendy Boggs Fundamentals of Rational Rose Student Manual version 2002.05.00 3. PRE REQUISITE Use Case Diagram 4. THEORY The easiest way to visualize an Activity diagram is to think of a flowchart of a code. The flowchart is used to depict the business logic flow and the events that cause decisions and actions in the code to take place. Activity diagrams represent the business and operational workflows of a system. An Activity diagram is a dynamic diagram that shows the activity and the event that causes the object to be in the particular state. 10

Elements of an Activity diagram An Activity diagram consists of the following behavioral elements: Element and its description Symbol Initial Activity: This shows the starting point or first activity of the flow. Denoted by a solid circle. This is similar to the notation used for Initial State. Activity: Represented by a rectangle with rounded (almost oval) edges. Decisions: Similar to flowcharts, a logic where a decision is to be made is depicted by a diamond, with the options written on either sides of the arrows emerging from the diamond, within box brackets. Signal: When an activity sends or receives a message, that activity is called a signal. Signals are of two types: Input signal (Message receiving activity) shown by a concave polygon and Output signal (Message sending activity) shown by a convex polygon. Concurrent Activities: Some activities occur simultaneously or in parallel. Such activities are called concurrent activities. For example, listening to the lecturer and looking at the blackboard is a parallel activity. This is represented by a horizontal split (thick dark line) and the two concurrent activities next to each other, and the horizontal line again to show the end of the parallel activity. Final Activity: The end of the Activity diagram is shown by a bull's eye symbol, also called as a final activity. 5. EXERCISES 1. Take all use cases from experiments no.2 and draw activity diagram for that using Rational rose. 11

6. SAMPLE OUTPUT Use case diagram of the given problem 7. DELIVERABLES Student should submit the solutions for the previous exercises. Activity diagrams for all use cases 12

3 Study of Class Diagram 13

1. OBJECTIVE In this lab, we will see what class diagrams are, what the elements of a class diagram are, what each of these elements signify, and how to identify them. After this lab students will be able to define classes for a system and read and create class diagrams. 2. REFERENCES www.developer.com The Unified Modeling Language User Guide by Grady Booch Mastering UML with Rational Rose by Wendy Boggs Fundamentals of Rational Rose Student Manual version 2002.05.00 3. PRE REQUISITE Use Case Diagram 4 THEORY A class diagram consists of a group of classes and interfaces reflecting important entities of the business domain of the system being modeled, and the relationships between these classes and interfaces. The classes and interfaces in the diagram represent the members of a family tree and the relationships between the classes are analogous to relationships between members in a family tree. Interestingly, classes in a class diagram are interconnected in a hierarchical fashion, like a set of parent classes and related child classes under the parent classes. A class diagram is a diagram showing a collection of classes and interfaces, along with the collaborations and relationships among classes and interfaces. A class diagram is a pictorial representation of the detailed system design. Design experts who understand the rules of modeling and designing systems design the system's class diagrams. A thing to remember is that a class diagram is a static view of a system. The 14

structure of a system is represented using class diagrams. Class diagrams are referenced time and again by the developers while implementing the system. 4.1 Classes Categories Classes are divided into three categories Entity Models information and associated behavior that is long lived, independent of the surrounding, application independent, and accomplishes some responsibility Boundary Handles the communication between the system surroundings and the inside of the system, provides interface, and facilitates communication with other systems Control Model sequencing behavior specific to one or more use cases. Control classes coordinate the events needed to realize the behavior specified in the use case, and they are responsible for the flow of events in the use case. 4.2 Elements of a Class Diagram Class: A class represents an entity of a given system that provides an encapsulated implementation of certain functionality of a given entity. These are exposed by the class to other classes as methods. Apart from business functionality, a class also has properties that reflect unique features of a class. The properties of a class are called attributes. A class is represented by a rectangle. The following diagram shows a typical class in a class diagram: 15

Relationships Between Classes relationships between classes, their notation, and what they mean. Sr. No. Relation Symbol Description 1 Association When two classes are connected to each other in any way, an association relation is established. For example: A "student studies in a college" association can be shown as: 1 a. Multiplicity An example of this kind of association is many students belonging to the same college. Hence, the relation shows a star sign near the student class (one to many, many to many, and so forth kind of relations). 1 b. Directed Association Association between classes is bi-directional by default. You can define the flow of the association by using a directed association. The arrowhead identifies the containercontained relationship. 1 c. Reflexive Association No separate symbol. However, the relation will point back at the same class. An example of this kind of relation is when a class has a variety of responsibilities. For example, an employee of a college can be a professor, a housekeeper, or an administrative assistant. 2 Aggregation When a class is formed as a collection of other classes, it is called an aggregation relationship 16

between these classes. It is also called a "has a" relationship. 2 a. Composition Composition is a variation of the aggregation relationship. Composition connotes that a strong life cycle is associated between the classes. 3 Inheritance/Generalization Also called an "is a" relationship, because the child classis a type of the parent class. Generalization is the basic type of relationship used to define reusable elements in the class diagram. Literally, the child classes "inherit" the common functionality defined in the parent class. 4 Realization In a realization relationship, one entity (normally an interface) defines a set of functionalities as a contract and the other entity (normally a class) "realizes" the contract by implementing the functionality defined in the contract. 4.3 A Few Terms Here are a few terms that we will be using to annotate our class diagrams. You should be familiar with them: Responsibility of a class: It is the statement defining what the class is expected to provide. Stereotypes: It is an extension of the existing UML elements; it allows you to define new elements modeled on the existing UML elements. Only one stereotype per element in a system is allowed. 17

Vocabulary: The scope of a system is defined as its vocabulary. Analysis class: It is a kind of a stereotype. Boundary class: This is the first type of an analysis class. In a system consisting of a boundary class, the users interact with the system through the boundary classes. Control class: This is the second type of an analysis class. A control class typically does not perform any business functions, but only redirects to the appropriate business function class depending on the function requested by the boundary class or the user. Entity class: This is the third type of an analysis class. An entity class consists of all the business logic and interactions with databases. 5. EXERCISE Draw a class diagram of the problem given in lab 1 6. SAMPLE OUTPUT Class diagram of a given system 7. DELIVERABLES Student should submit the solutions for the previous exercises. Also student should use these class elicitation techniques to identify the classes for project. 18

4 Study of Package Diagram 19

1. OBJECTIVE In this lab, we will see what package diagram is, what the elements of a package diagram are, what each of these elements signify. After this lab students will be able to create package diagram. 2. REFERENCES www.developer.com The Unified Modeling Language User Guide by Grady Booch Mastering UML with Rational Rose by Wendy Boggs Fundamentals of Rational Rose Student Manual version 2002.05.00 3. PRE REQUISITE Class Diagram Use Case Diagram 4. THEORY Package diagrams are used to reflect the organization of packages and their elements. When used to represent class elements, package diagrams provide a visualization of the namespaces. The most common use for package diagrams is to organize use case diagrams and class diagrams, although the use of package diagrams is not limited to these UML elements. 4.1 Elements of an Package diagram Package Packages are general purpose grouping mechanisms. A package is purely conceptual. A package provides the ability to group together classes, interfaces, components, nodes, collaborations, use cases and even other packages which are either similar in nature or re 20

lated. Grouping these design elements in a package element provides better readability of class diagrams, especially complex class diagrams. Packages have a name that uniquely identifies the package. A package is represented as a tabbed folder, usually including only its name and, sometimes, its contents Relationship 5. EXERCISE Draw a package diagram of the problem given in lab 1 6. SAMPLE OUTPUT Package diagram of given project. 7. DELIVERABLES Student should submit the solutions for the previous exercises. Also student should draw package diagram. 21

5 Study Of Sequence Diagram 22

1. OBJECTIVE In this lab, we will see what Sequence diagram is, what the elements of a Sequence diagram are, what each of these elements signify. By the end of this lab, student will know what a Sequence diagram is, what its elements are, and, student will be able to create Sequence diagrams for your system. 2. REFERENCES www.developer.com The Unified Modeling Language User Guide by Grady Booch Mastering UML with Rational Rose by Wendy Boggs Fundamentals of Rational Rose Student Manual version 2002.05.00 3. PRE REQUISITE Class Diagram Use Case Diagram Activity Diagram 4. THEORY A Sequence diagram depicts the sequence of actions that occur in a system. The invocation of methods in each object, and the order in which the invocation occurs is captured in a Sequence diagram. This makes the Sequence diagram a very useful tool to easily represent the dynamic behavior of a system. A Sequence diagram is two dimensional in nature. On the horizontal axis, it shows the life of the object that it represents, while on the vertical axis, it shows the sequence of the creation or invocation of these objects. Because it uses class name and object name references, the Sequence diagram is very useful in elaborating and detailing the dynamic design and the sequence and origin of in 23

vocation of objects. Hence, the Sequence diagram is one of the most widely used dynamic diagrams in UML. Elements of a Sequence diagram A Sequence diagram consists of the following behavioral elements: S. No. Element and its description Symbol 1 Object: The primary element involved in a sequence diagram is an Object an instance of a class. A Sequence diagram consists of sequences of interaction among different objects over a period of time. An object is represented by a named rectangle. The name to the left of the ":" is the object name and to its right is the class name. 2 Message: The interaction between different objects in a sequence diagram is represented as messages. A message is denoted by a directed arrow. Depending on the type of message, the notation differs. In a Sequence diagram, you can represent simple messages, special messages to create or destroy objects, and message responses. 5. EXERCISE Draw a Sequence diagram of the problem given in lab 1 6. SAMPLE OUTPUT Sequence diagram of given project. 7. DELIVERABLES Student should submit the solutions for the previous exercises. Also student should draw Sequence diagram. 24

6 Study Of Collaboration Diagram 25

1. OBJECTIVE In this lab, we will see what Collaboration diagram is, what the elements of a Collaboration diagram are, what each of these elements signify. By the end of this lab, student will know what a Collaboration diagram is, what its elements are, and, student will be able to create Collaboration diagrams for given system. 3. REFERENCES www.developer.com The Unified Modeling Language User Guide by Grady Booch Mastering UML with Rational Rose by Wendy Boggs Fundamentals of Rational Rose Student Manual version 2002.05.00 3. PRE REQUISITE Class Diagram Use Case Diagram Activity Diagram 4. THEORY A Collaboration diagram is very similar to a Sequence diagram in the purpose it achieves; in other words, it shows the dynamic interaction of the objects in a system. A distinguishing feature of a Collaboration diagram is that it shows the objects and their association with other objects in the system apart from how they interact with each other. The association between objects is not represented in a Sequence diagram. A Collaboration diagram is easily represented by modeling objects in a system and representing the associations between the objects as links. The interaction between the objects is denoted by arrows. To identify the sequence of invocation of these objects, a number is placed next to each of these arrows. 26

A sophisticated modeling tool can easily convert a collaboration diagram into a sequence diagram and the vice versa. Hence, the elements of a Collaboration diagram are essentially the same as that of a Sequence diagram. 4.1 Elements of a Collaboration diagram A Collaboration diagram consists of the following elements: S. No. Element and its description Symbol 1 Object: The objects interacting with each other in the system. Depicted by a rectangle with the name of the object in it, preceded by a colon and underlined. 2 Relation/Association: A link connecting the associated objects. Qualifiers can be placed on either end of the association to depict cardinality. 3 Messages: An arrow pointing from the commencing object to the destination object shows the interaction between the objects. The number represents the order/sequence of this interaction. 5. EXERCISE: Draw a State Chart diagram of the problem given in lab 1 6. SAMPLE OUTPUT Collaboration Diagram of given project. 7. DELIVERABLES Student should submit the solutions for the previous exercises. Also student should draw Collaboration diagram. 27

7 Study Of State Chart Diagram 28

1. OBJECTIVE By the end of this lab, student will know what a State diagram is, what its elements are, and students will be able to create State diagrams for the system. 2. REFERENCES www.developer.com The Unified Modeling Language User Guide by Grady Booch Mastering UML with Rational Rose by Wendy Boggs Fundamentals of Rational Rose Student Manual version 2002.05.00 3. PRE REQUISITE Class Diagram Use Case Diagram Activity Diagram 4. THEORY State diagrams (also called State Chart diagrams) are used to help the developer better understand any complex/unusual functionalities or business flows of specialized areas of the system. In short, State diagrams depict the dynamic behavior of the entire system, or a sub system, or even a single object in a system. This is done with the help of Behavioral elements. 4.1 Elements of a State diagram A State diagram consists of the following behavioral elements: 29

S. No. Element and its Description Symbol 30

1 Initial State: This shows the starting point or first activity of the flow. Denoted by a solid circle. This is also called as a "pseudo state," where the state has no variables describing it further and no activities. 2 State: Represents the state of object at an instant of time. In a state diagram, there will be multiple of such symbols, one for each state of the Object we are discussing. Denoted by a rectangle with rounded corners and compartments (such as a class with rounded corners to denote an Object). We will describe this symbol in detail a little later. 3 Transition: An arrow indicating the Object to transition from one state to the other. The actual trigger event and action causing the transition are written beside the arrow, separated by a slash. Transitions that occur because the state completed an activity are called "triggerless" transitions. If an event has to occur after the completion of some event or action, the event or action is called the guard condition. The transition takes place after the guard condition occurs. This guard condition/event/action is depicted by square brackets around the description of the event/action (in other words, in the form of a Boolean expression). 4 History States: A flow may require that the object go into a trance, or wait state, and on the occurrence of a certain event, go back to the state it was in when it went into a wait state its last active state. This is shown in a State diagram with the help of a letter H enclosed within a circle. 5 Event and Action: A trigger that causes a transition to occur is called as an event or action. Every transition need not occur due to the occurrence of an event or action directly related to the state that transitioned from one state to another. As described above, an event/action is written above a transition that it causes. 6 Signal: When an event causes a message/trigger to be sent to a state, that causes the transition; then, that message sent by the event is called a signal. Represented as a class with the <<Signal>> icon above the action/event. 7 Final State: The end of the state diagram is shown by a bull's eye symbol, also called a final state. A final state is another example of a pseudo state because it does not have any variable or action described. 5. EXERCISE: 31

Draw a State Chart diagram of the problem given in lab 1 6. SAMPLE OUTPUT State Diagram of given project. 7. Deliverables Student should submit the solutions for the previous exercises. Also student should draw State diagram. 32

8 Study Of Component Diagram 33

1. OBJECTIVE In this lab, we will see what Component diagram is, what the elements of a Component diagram are, what each of these elements signify. By the end of this lab, student will know what a Component diagram is, what its elements are, and, student will be able to create Component diagrams for given system. 2. REFERENCES www.developer.com The Unified Modeling Language User Guide by Grady Booch Mastering UML with Rational Rose by Wendy Boggs Fundamentals of Rational Rose Student Manual version 2002.05.00 3. PRE REQUISITE Class Diagram Use Case Diagram Activity Diagram 4. THEORY The different high level reusable parts of a system are represented in a Component diagram. A component is one such constituent part of a system. In addition to representing the high level parts, the Component diagram also captures the inter relationships between these parts. So, how are component diagrams different from the previous UML diagrams that we have seen? The primary difference is that Component diagrams represent the implementation perspective of a system. Hence, components in a Component diagram reflect grouping of the different design elements of a system, for example, classes of the system. Let us briefly understand what criteria to apply to model a component. First and foremost, a component should be substitutable as is. Secondly, a component must provide an interface to enable other components to interact and use the services provided by the 34

component. So, why would not a design element like an interface suffice? An interface provides only the service but not the implementation. Implementation is normally provided by a class that implements the interface. In complex systems, the physical implementation of a defined service is provided by a group of classes rather than a single class. A component is an easy way to represent the grouping together of such implementation classes. You can model different types of components based on their use and applicability in a system. Components that you can model in a system can be simple executable components or library components that represent system and application libraries used in a system. You also can have file components that represent the source code files of an application or document files that represent, for example, the user interface files such as HTML or JSP files. Finally, you can use components to represent even the database tables of a system as well! Elements of a Component Diagram A Component diagram consists of the following elements: S. NO. Element and its description Symbol 1 Component: The objects interacting with each other in the system. Depicted by a rectangle with the name of the object in it, preceded by a colon and underlined. 2 Class/Interface/Object: Similar to the notations used in class and object diagrams 3 Relation/Association: Similar to the relation/association used in class diagrams 5. EXERCISE Draw a Component diagram of the problem given in lab 1 6. DELIVERABLES Student should submit the solutions for the previous exercises. Also student should draw component diagram. 35

9 Study Of Deployment Diagram 36

1. OBJECTIVE In this lab, we will see what Deployment diagram is, what the elements of a deployment diagram are, what each of these elements signify. By the end of this lab, student will know what a deployment diagram is, what its elements are, and, student will be able to create deployment diagrams for given system. 2. REFERENCES www.developer.com The Unified Modeling Language User Guide by Grady Booch Mastering UML with Rational Rose by Wendy Boggs Fundamentals of Rational Rose Student Manual version 2002.05.00 3. PRE REQUISITE Class Diagram Use Case Diagram Activity Diagram 4. THEORY A deployment diagram models the run time architecture of a system. It shows the configuration of the hardware elements (nodes) and shows how software elements and artifacts are mapped onto those nodes. A UML 2 deployment diagram depicts a static view of the run time configuration of processing nodes and the components that run on those nodes. In other words, deployment diagrams show the hardware for your system, the software that is installed on that hardware, and the middleware used to connect the disparate machines to one another. You want to create a deployment diagram for applications that are deployed to several machines, for example a point of sales application running on a thin client network computer which interacts with several internal servers behind your corporate firewall or a customer service system deployed using a web services architecture such as Microsoft s 37

.NET. Deployment diagrams can also be created to explore the architecture of embedded systems, showing how the hardware and software components work together. In short, you may want to consider creating a deployment diagram for all but the most trivial of systems. Elements of a Component Diagram A Component diagram consists of the following elements: Node A Node is either a hardware or software element. It is shown as a three dimensional box shape, as shown below. Node Instance A node instance can be shown on a diagram. An instance can be distinguished from a node by the fact that its name is underlined and has a colon before its base node type. An instance may or may not have a name before the colon. The following diagram shows a named instance of a computer. Node Stereotypes A number of standard stereotypes are provided for nodes, namely «cdrom», «cd rom», «computer», «disk array», «pc», «pc client», «pc server», «secure», «server», «storage», 38

«unix server», «user pc». These will display an appropriate icon in the top right corner of the node symbol Artifact An artifact is a product of the software development process. That may include process models (e.g. use case models, design models etc), source files, executables, design documents, test reports, prototypes, user manuals, etc. An artifact is denoted by a rectangle showing the artifact name, the «artifact» keyword and a document icon, as shown below. Association In the context of a deployment diagram, an association represents a communication path between nodes. The following diagram shows a deployment diagram for a network, depicting network protocols as stereotypes, and multiplicities at the association ends. 39

Node as Container A node can contain other elements, such as components or artifacts. The following diagram shows a deployment diagram for part of an embedded system, depicting an executable artifact as being contained by the motherboard node. 40

5. EXERCISE Draw a Deployment diagram of the problem given in lab 1 6. DELIVERABLES Student should submit the solutions for the previous exercises. Also student should draw Deployment diagram. 41

10 Study Of Use case realization 42

1. OBJECTIVE In this lab, student will get an idea about Use case realization. 2. REFERENCES www.developer.com The Unified Modeling Language User Guide by Grady Booch Mastering UML with Rational Rose by Wendy Boggs Fundamentals of Rational Rose Student Manual version 2002.05.00 3. PRE REQUISITE Class Diagram Use Case Diagram Use case specification Sequence diagram Communication diagram 4. THEORY A use case realization is the realization of the functionality of all use cases in system. The use case realization is implemented by collaboration of the use cases attached to it by dependencies. When the collaboration is blow up we get 2 parts A.) Class diagram implementing the scenario. B.) Collaboration or Sequence diagram Use case realization is the implementation of all business functionality for the scenario under consideration 43

UseCase UseCase realization 2. EXERCISE Show Use case realization 3. DELIVERABLES Student should submit the solutions for the previous exercises. Also student understands Use Case realization. 44