Sie sind auf Seite 1von 29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

Chapter 2
Introducing UML
OOAD is a technique for analyzing the requirements and creating the design for a software system. The analysis done using OOAD needs to be depicted in a graphical form. This method of displaying the information graphically is known as visual modeling. The visual models of a software system can be created by using Unified Modeling Language (UML). UML provides a variety of diagrams to represent the structure and design of a software system. It helps project teams to communicate, explore potential designs, and validate the architectural design of the software. This chapter discusses the need, scope, and building blocks of UML. It explains the types of UML diagrams and the various views of software systems. In addition, the chapter provides an overview of Microsoft Visio as a UML tool. Finally, it discusses the benefits, the life cycle, and the best practices of Rational Unified Process (RUP).

Objectives
In this chapter, you will learn to: Identify the evolution, scope, and building blocks of UML Identify the types of UML diagrams Use Microsoft Visio to create UML diagrams Identify the benefits, lifecycle, and best practices of RUP

www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm

1/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

Overview of UML
Consider an architect who has acquired a contract of a building. The architect needs to work out the blueprint of the building on paper and get it approved from the client before the construction of the building actually begins. The same analogy applies to software systems. You need to create a blueprint that depicts the structure and design of the software system before the development of the software system begins. At the onset, if you model the blueprint of the software system, it prevents the occurrence of any design faults. This reduces the rework and development time of the system in the later phases of SDLC. UML is a standard language for creating blueprints that depict the structure and design of the software system. You can use UML for modeling systems that can range between enterprise information systems to distributed Web-based applications. UML is a notational language that enables the stakeholders to view the architecture of the system from various perspectives. There are several tools available, such as Rational Rose, Jude, AgroUML, Visio and Poseidon, which you can use to design software systems by using UML.

Evolution of UML
The evolution of UML began with the need for a modeling language in which you can develop models of object-oriented software systems. During the mid 1970s and late 1980s, object-oriented modeling languages were developed for the analysis and design of software. Of these modeling languages, the most prominently used languages were Booch's Booch93, Jacobson's Object Oriented Software Engineering (OOSE), and Rumbaugh's Object Modeling Technique-2 (OMT). Each of these languages was complete in itself and was recognized as having certain strengths and weaknesses. For example, Booch93 was efficient in projecting the software system during the design and construction phases of the projects. OOSE was more helpful in the requirements capturing and analysis phases. OMT was used for the analysis of data-intensive information systems. Because several modeling languages were being used in the industry, there was a need for a standard language for modeling. In October 1994, Grady Booch, Ivor Jacobson, and Jim Rumbaugh of Rational Software Corporation began the unification of Booch93, OMT, and OOSE. They developed a unified language and released version 0.9 and 0.91 of UML. To standardize UML, Object Management Group (OMG), a non-profit organization for standardizing specifications, issued a Request for Proposal (RFP) in 1996. In response to the RFP issued by OMG, a UML consortium was established with the support of major software organizations such as HP, I-Logix, IBM, Microsoft, Oracle, Rational Software, and Unisys. The UML consortium prepared and presented the revised version of UML 1.1 to OMG. Finally, OMG accepted UML as a standard modeling language and took over the responsibility for overseeing the maintenance of UML. Many versions of UML were released with more additions and modifications. This course discusses UML 2.0.

Scope of UML
www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm 2/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

Rational Software Corporation, which has now been acquired by IBM, defines UML as: The UML is a language for specifying, constructing, visualizing, and documenting the artifacts of a software-intensive system. The artifacts might include requirements, architecture, design in terms of classes, objects or interfaces, source code, tests, prototypes, and the software releases of a software system. For a better understanding, you can further divide the definition of UML into the following subparts: UML is a language for specifying artifacts : This means that UML provides the notations for classes, objects, and interfaces, which enable the development team to define the scope and content of a software system. UML is a language for visualizing artifacts : This means that UML allows you to create diagrams to visualize a software system. Creating diagrams provides a better understanding of the structure and content of the software system. For example, a diagram depicts the hierarchical arrangement of classes more clearly than code. Another benefit is that even if the code is lost, the logical structure of the system remains intact in the form of diagrams. The use of predefined notations for developing diagrams enables one development team to interpret the models created by other teams. UML is a language for constructing artifacts : This means that UML allows code generation from a UML model. Generating code from a UML model is called forward engineering. In addition, UML enables reverse engineering, which means it allows you to reconstruct a model from code. UML is a language for documenting artifacts : This means that you can use the diagrams as input documents for the subsequent phases of SDLC.

Building Blocks of UML


The building blocks of UML include the components that are necessary for creating models of the software systems. The three types of UML building blocks are: Basic UML constituents : Include the static, dynamic, grouping, and annotational constituents of UML. Relationships : Depict the relations between the various constituents of a UML model. Diagrams : Represent the various artifacts of a system graphically. Diagrams enable you to visualize a system from all the aspects of software development. To understand the basic UML constituents, let us revisit the analogy of constructing a building. You require bricks, sand, cement, plastic, and iron bars as the base constituents to begin the construction of a building. These constituents do not change when you are giving shape to the building. Similarly, to begin the design of a software system, you need to identify classes, interfaces, objects, use cases, collaborations, components, and nodes. These form the static constituents of the software system because they do not change even while you identify the interactions or change of state of these constituents. Again going back to the analogy of the building, you need to identify which door leads to which room and which window is opening in which direction. This will give a shape to the building. You may also refer to it as the behavior of the building. Similarly, the static constituents, such as classes, need to interact to depict their response to the other objects and classes. You can depict such responses and relations between classes by using messages at the design phase. Messages and states form the dynamic constituents of the software system.
www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm 3/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

The walls, doors, windows, ceiling, and floor make up a room of the building. Going into more detail, the rooms, kitchen, and wash rooms form the complete apartment. Similarly, the classes and interfaces need to be grouped in packages, which in turn, can be grouped together to form a complete software system. A package is the grouping constituent used in UML. Each apartment in the building has an owner and a name plate of its owner. Similarly, to provide more explanation on each structural or grouping constituent, such as classes and packages, you should provide an explanation on the role of each constituent in the model. The UML annotational constituent, note, provides an explanation on the structural, behavioral, and grouping constituents.

www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm

4/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

Identifying the Types of UML Diagrams


UML provides the following thirteen diagrams to represent the structure and design of a software system: Use case diagrams Class diagrams Object diagrams Communication diagrams Sequence diagrams State Machine diagrams Activity diagrams Package diagrams Component diagrams Deployment diagrams Timing diagrams Composite Structure Diagrams Interaction Overview Diagrams

UML diagrams use various notations to specify the syntax of the constructs used for creating the diagrams. For example, UML notations specify how to depict the user or the classes and interfaces of the system.

Defining Use Case Diagrams


A use case diagram depicts the various operations that a system performs. It contains use cases, actors, and their relationships. Use cases are the sequence of actions that form a single unit of work for an actor. An actor represents a user who is external to the system and interacts with the use case. The following figure depicts the graphical notation for a use case diagram.

A use case diagram can be drawn for any given software system. For example, in an order processing
www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm 5/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

system, the inventory department places a request for the machine parts that are out of stock. In this case, the inventory department is an actor that uses the system to place an order for the parts. Similarly, the inventory department also receives the supply to update the stocks. The use cases for the actor, I n v e n t o r yD e p a r t m e n t ,are O r d e rP a r t sand A c c e p tS u p p l y . The following figure shows the use case diagram for the order processing system.

Defining Class Diagrams


A class d i a g r a mrepresents a set of classes, interfaces, and their relationships. You can represent a class in a rectangular box with three compartments. The first compartment shows the class name. The second compartment shows the attributes of the class and the third compartment shows the methods associated with the class. The following figure shows the graphical notation for classes along with their attributes, methods, and relationships.

You can draw a class diagram by identifying the classes in the system. For example, the classes identified in the order processing system are S u p p l i e rand P a r t s . The various attributes of the S u p p l i e r class are s c o d e ,n a m e , and c i t y , and the methods of the S u p p l i e rclass are s u p p l y ( )and r e c e i v e p a y m e n t ( ) . The various attributes for the P a r t sclass are pcode, name, q t y _ o r d e r e d ,q t y _ r e c e i v e d , and q t y _ r e j e c t e d , and the methods of the P a r t sclass are o r d e r ( ) ,r e c e i v e d ( ) , and u p d a t e i n v e n t o r y ( ) . The following figure shows the class
www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm 6/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

diagram for the order processing system.

Defining Object Diagrams


An object diagram represents instances of a class d i a g r a m . You represent an object in a rectangular box with two compartments. The object name appears before the class name in the first compartment. The second compartment shows the attributes of the objects. The following figure shows the graphical notation for objects along with their attributes and relationships.

You can draw an object d i a g r a mby identifying the classes in the system. The following figure shows the object d i a g r a mfor the order processing system.

Defining Communication Diagrams


Communication diagrams represent an interaction between objects in the form of messages. For example, the following figure depicts the interaction between the I n v e n t o r yD e p a r t m e n tand an object of the s u p p l i e rclass of the order processing system.
www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm 7/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

Communication diagrams are also called as collaboration diagrams.

Defining Sequence Diagrams


Sequence diagrams represent an interaction between objects in the form of messages ordered in a sequence by time. The difference between the sequence and communication diagrams is that communication diagrams emphasize on the structural organization of objects as opposed to sequence diagrams that show the messages exchanged between objects ordered in a sequence by time. You can draw a sequence diagram for any given system by using the classes and use cases identified for the system. The following diagram shows the sequence of messages in the order processing system.

In the order processing system, the I n v e n t o r yD e p a r t m e n tplaces the order with the
www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm 8/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

s u p p l i e r , supp1. The s u p p l i e r ,s u p p 1 , supplies these parts to the I n v e n t o r y D e p a r t m e n t .

Defining State Machine Diagrams


A state machine diagram shows how a class reacts when an event occurs. You can draw a state machine diagram by using the classes and the use cases identified for the system. For example, in the order processing system, the P a r t sclass has an attribute, r e o r d e r . An order is placed when the stock reaches a particular level. In this case, the r e o r d e rattribute is set to true. After the supplier supplies the parts, the re-order level is changed to false. The following figure shows the state diagram for the P a r t sobject in an order processing system.

A state machine diagram is also called as a state diagram or a state chart diagram.

Defining Activity Diagrams


Activities are a representation of the various operations performed by a class. An activity diagram depicts the flow of control from one activity to another. You can draw an activity diagram by identifying the activities performed by the various classes of the system. For example, the various activities in the order processing system are_ p l a c i n go r d e r , a c c e p t i n gt e n d e r s , and r e c e i v i n gs u p p l y . The following figure shows the flow of the activities for the order processing system.

www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm

9/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

Defining Package Diagrams


All the interrelated classes and interfaces of the system when grouped together form a package. To represent all these interrelated classes and interfaces UML provides package diagrams. Package diagrams help in representing the various packages of a software system and the dependencies between them. It also gives a high-level impression of use case and class diagrams. A package is depicted, as shown in the following figure.

www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm

10/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

Defining Component Diagrams


You combine packages or individual entities to form components. You can depict various components and their dependencies using a component diagram. The following figure shows the graphical notation for representing a component.

To understand how a component diagram depicts the components and their dependencies, consider an example of the o r d e r p r o c e s sexecutable component that regulates the o r d e rand s u p p l y procedure. The o r d e r p r o c e s sexecutable component depends on the o r d e r . c sfile for placing an order for the machine parts. Similarly, the o r d e r p r o c e s sexecutable component depends on the p r o c e s s u p p l y . c sfile for processing the supply received. The following diagram shows the component diagram for the order processing system.

www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm

11/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

Defining Deployment Diagrams


A deployment diagram shows the physical placement of components in nodes over a network. A deployment diagram can be drawn by identifying nodes and components. For example, in the order processing system, the o r d e r p r o c e s s . e x ecomponent is placed on the C l i e n tnode and the database component is placed on the D a t a b a s eS e r v e rnode. The request for the data for the order processing system is routed to the D a t a b a s eS e r v e rthrough the P r o c e s s o rS e r v e r . The following diagram shows the deployment diagram for the order processing system.

Defining Timing Diagrams


Timing diagrams are used to represent the changes in state and value of one or more objects over a period of time. Timing diagrams are often used to design embedded software. Timing diagrams are of two types: Concise notation Robust notation

Concise Notation
www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm 12/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

In the concise notation, a value lifeline is used to represents the changes in the value of objects over a period of time. The time elapsed is represented on the X-axis and the value is shown between the pair of horizontal lines which cross over at each change in value. The following timing diagram depicts the value lifeline of a printer.

Robust Notation
In the robust notation, a state lifeline is used to represent the changes in state of objects over a period of time. The X-axis represents the time elapsed and the Y-axis depicts a set of states. The following figure depicts the state lifeline for a printer.

State lifelines of two or more objects can be stacked on top of each other. The lifelines stacked in this manner must have the same X-axis. Messages can be passed between the lifelines. Each state transition is associated with a defined event or a time constraint, which indicates when an event must occur. In addition, each state may be associated with a duration constraint, which indicates how long the object remains in that state. The following timing diagram depicts the state lifelines of a printer and a PC.

www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm

13/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

Defining Composite Structure Diagrams


A composite structure diagram represents the internal structure and interaction points of a classifier. Classifier refers to classes, objects, or interfaces. Interaction points refer to the points within a classifier using which the classifier interacts with other parts of the system. Composite structure diagrams are used to explore run-time instances of interconnected classifiers collaborating over communications links. A composite structure diagram is made up of several elements, such as parts, ports, and interfaces. A part is an element that represents a set of one or more instances owned by the containing classifier instance. You depict a part as a rectangle contained within the body of a class or component element. The following figure shows parts of the C a rclass connected through.

www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm

14/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

A port is an interaction point between a classifier instance and its environment or between the behavior of the classifier and its internal parts. A classifier can have multiple ports to show different interactions. You depict a port as a small, named square on the boundary of the owning classifier. A port can interact in both directions. Therefore, a port can be used to specify the services provided by a classifier to its environment and the services required by the classifier from its environment. The services provided and required by a classifier are represented as interfaces owned by the classifier. A provided interface is represented as a ball on a stick and a required interface is represented as a socket on a stick. The following figure depicts a port on the E n g i n eclass with provided and required interfaces.

Defining Interaction Overview Diagrams


Interaction overview diagrams give an overview of interaction diagrams. Interaction diagrams include the following types of diagrams: Sequence diagram Communication diagram Timing diagram Interaction overview diagram Interaction overview diagrams represent the logical interaction between the interaction diagrams and the process flows in between the set of interaction diagrams.
www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm 15/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

Interaction overview diagrams are a variant of activity diagrams. As a result, most of the diagram notation used for interaction overview diagrams is similar to the diagram notation used for activity diagrams. However, instead of activity elements, interaction overview diagrams use one of the following elements: Interaction elements Interaction occurrence elements Interaction elements display an inline interaction diagram, which can be a sequence diagram, communication diagram, timing diagram, or interaction overview diagram. Interaction occurrence elements are references to an existing interaction diagram. Interaction occurrence elements are visually represented by a frame, with ref in the frame's title space. The diagram name is indicated in the frame contents. The following figure depicts the interaction overview diagram for an inventory management system.

Associating UML Diagrams with UML Modeling Techniques


www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm 16/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

You can divide all the UML diagrams into four modeling techniques: Requirements modeling: Involves depicting the requirements using use case diagrams. Static modeling: Involves depicting the static constituents of the software system using the class, object, and composite structure diagrams. Dynamic modeling: Involves depicting the behavior of static constituents using the following diagrams: Activity diagrams State machine diagrams Communication diagrams Sequence diagrams Interaction overview diagrams Timing diagrams Architectural modeling: Involves depicting the architecture of the software system into multiple tiers, such as presentation, business, and resource. Architectural modeling depicts the architecture of the software system by using the following diagrams: Package diagram Component diagram Deployment diagram

Just a minute:

Which of the following UML diagrams is used for requirement modeling? 1. Use Case diagram 2. Class and Object diagram 3. State diagram 4. Component diagram Answer: 1. Use Case diagram

Viewing a Software System Architecture


You can define the architecture of a software system as an arrangement of the static and dynamic constituents in a model. You can view the architecture of a software system from different perspectives. You need to do this because it helps the stakeholders of the system to make decisions about the project. The stakeholders may include analysts, architects, developers, testers, and end users. The various views of a software system are: Use case view: Indicates the functionalities that the system offers to each stakeholder. You
www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm 17/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

can depict this view by using the use case, sequence, communication, state, activity, and interaction overview diagrams. Design view: Focuses on the static and dynamic representation of the system. The stakeholders primary interest in viewing the system from the design perspective is to ensure that all the primary requirements of the system are implemented. For example: Analysts, who design the software solution, use this view to know if all the requirements are fulfilled in terms of static and dynamic constituents. Developers use the design view to verify whether or not all the static and dynamic constituents enable them to code the software solution. Project managers use this view to prepare project plans in terms of the number of components involved in the project and to estimate the time required to code each component. You can depict the design view using class, object, sequence, communication, state, composite structure, interaction overview, and activity diagrams. Process view: Represents the various processes executing in a system at a given instance of time. The primary focus of this view is to evaluate the execution of processes in terms of performance and scalability. The process view is again important for analysts, architects, and end users to view the information flow during process execution and how data is modified while processing. You can depict this view by using the class, object, sequence, communication, state, timing, interaction overview, and activity diagrams. Implementation view: Represents the physical system including the files and components required to assemble the system. This view focuses on various methods of assembling and configuring the components to release the required software system. This view is important for the client and project managers in terms of the plans for the release. It is important for developers and testers to know about the final components that need to be assembled for the system. You can depict this view by using the component, sequence, communication, state, composite structure, timing, and activity diagrams. Deployment view: Represents the hardware components on which the software system will execute. This view is important to the client and developers because it enables them to identify the hardware and network configuration required to install the software system. You can depict this view by using the deployment diagrams. The following figure shows the multiple views that together represent the model of a software system designed using UML.

Each of the five views are interlinked. For example, the deployment view includes the classes, interfaces,
www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm 18/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

and collaborations of the design view. In addition, the use case view is placed in the center because it is used to capture and represent the system requirements from the perspective of other views.

Just a minute:

Which of the following views of a software system focuses on the static and dynamic representation of the system? 1. Use Case view 2. Deployment view 3. Design view 4. Implementation view Answer: 3. Design view

Identifying the Role of UML in SDLC


The diagrams developed using UML serve as key documents in each phase of SDLC. In addition, you can use UML to develop software systems based on any SDLC model. For example, you can use UML to design a software system that follows the linear, prototyping, or iterative approach to system modeling. You can map each of the UML diagrams with the various phases of SDLC. The requirement analysis phase of SDLC involves identifying the end users expectations from a software system. The following table lists the UML diagrams that can be used in the requirement analysis phase. Diagram Use case Class Sequence and Communication Activity Interaction Overview Role in the Requirements Analysis Phase Depicts the various users of the system and how they are going to use the system to meet the requirement objectives. Depicts the classes and their dependencies for the primary requirements of the system. Depicts the sequence of steps performed in a process. Depicts the specific activities that are required to understand the functional requirements of the system. Depicts how the various processes interact with each other.
UML Diagrams and their Role in the Requirement Analysis Phase
www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm 19/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

In the design phase, the analysts and architects can be more specific in depicting the details of the system through the UML diagrams. The following table lists various UML diagrams that you can use in the design phase. Diagram Class Sequence and Communication Package Deployment State Component Composite Structure Interaction Overview Role in the Design Phase Depicts the classes, their attributes and operations, and the relationship between classes. Depicts the sequence of interactions between the various objects of the system. Depicts the various classes that are grouped together depending on their functionality. Depicts the layout of the software components over the network . Depicts the state of an object on the occurrence of an event . Depicts the components required for executing the system. Depicts the internal structure and interaction points of the various classes, objects, and interfaces. Depicts the interactions between the various interaction diagrams.
UML Diagrams and their Role in the Design Phase

In the testing phase, you test the system to detect whether the software system works according to the requirements. You use the use case diagram in the test phase to check whether the system meets the requirements specified in the use case diagrams.

www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm

20/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

Introducing Visio as a UML Tool


Visio is a Microsoft tool that facilitates object-oriented design using UML. This tool runs efficiently on Windows XP, Windows 2000, Windows NT, and Mac operating systems. It helps to create UML diagrams. It also helps in generating C#, C++, or Visual Basic code for the UML diagrams.

Using Visio to Create UML Diagrams


To create a simple use case diagram using Visio, you need to perform the following steps: 1. Select StartAll ProgramsMicrosoft OfficeMicrosoft Office Visio for Enterprise Architects . The Microsoft Visio window appears. 2. Select FileNewChoose Drawing Type . The Choose Drawing Type window appears, as shown in the following figure.

3. Click Software from Category section in the Choose Drawing Type window. All the templates will appear in the Template section, as shown in the following figure.

www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm

21/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

4. Select UML Model Diagram (Metric) from the list of templates. The Drawing1Microsoft Visio window with a blank drawing page appears, as shown in the following figure.

The stencils contain the shapes you need to create your diagrams.
www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm 22/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

The English-language version of Microsoft Office Visio comes with two sets of templates: those that use US units and those that use metric units. US units are the units used in the US measurement system, such as inches, feet, yards, and miles. If you want to create some drawings that use metric and some that use US units, you need to install both sets of templates. You can choose which units you want to use when you start a new drawing.
5. Select the UML Use Case (Metric) stencil in the Shapes window to view the shapes it contains, as shown in the following figure.

6. Drag the Actor symbol ( stencil, to draw an actor. 7. Drag the Use case symbol ( stencil, to draw a use case.

) on the drawing page from the UML Use Case (Metric) ) on the drawing page from the UML Use Case (Metric)

8. Drag the Communication symbol ( ) on the drawing page from the UML Use Case (Metric) stencil, to represent the interaction between the actor and the use case. Drag one end of the Communication symbol and drop it on a cross symbol known as Connection Point on the actor so that one end of the Communication symbol gets connected to the
www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm 23/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

actor. Now drag the other end of the Communication symbol and drop it on the use case.

Actor and use case need to be connected through an association. In Visio an association is represented by using the Communication symbol.
This connects the actor with the use case to create a simple use case diagram, as shown in the following figure.

The cross symbols on a shape represent the connection points. Two symbols will connect with each other only if they are connected at these connection points. If the connection points are not visible, select ViewConnection Points to make connection points visible with each symbol on the drawing page. If you do not want to view the connection points, you can hide them by again selecting ViewConnection Points.
www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm 24/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm

25/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

Identifying Rational Unified Process (RUP)


RUP is a software development methodology developed by Rational Software Corporation, which is now a division of IBM. It is a process framework that helps you create and deploy software designed using OOAD. RUP provides templates, examples, and tools that act as mentors for all the activities performed in the different phases of the software development process. It includes a hyperlinked knowledge base with sample artifacts and detailed descriptions for many different types of activities. Using RUP, the development team has a common knowledge base, language, process, and view on how to develop the software. RUP is completely compatible with UML and is integrated with the Rational suite of software development tools. RUP is included in the IBM Rational Method Composer (RMC) product, which allows customization of the process. RUP utilizes Rational tools to generate development components, such as documents, manuals, and code.

Benefits of Using RUP


RUP is a process that helps manage the quality and risks in a software project. The benefits of using RUP are: Provides team members with easy access to a knowledge base and, as a result, enhances team productivity. Provides a guideline on how to effectively use UML. Supports the tools that automate large parts of the development process. Supports the iterative process for software development. This allows you to identify and resolve the risks in a software project that are identified during the various iterations of the software development process. Supports an architecture-centric development process. In addition, RUP focuses on the early development of software architecture, which facilitates parallel development, minimizes rework, and increases the probability of component reuse and eventual system maintainability. Allows customization of the process. This means that RUP can be tailored to the needs of small development teams as well as large development organizations. Allows you to systematically control the changes in the software during the development life cycle. Allows you to execute test cases.

Life Cycle of RUP


RUP defines the following four phases of the life cycle of a project: Inception: Includes establishing the business model and the scope for the project. In addition, it also involves planning for the type of development process model. Elaboration: Includes analyzing the problem domain, developing project plan, and eliminating highest possible risks. This phase also includes development of architectural plan after the analysis of the entire system is complete. In addition, the phase includes implementing use cases
www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm 26/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

to demonstrate the architecture of the software system. Construction: Includes developing software product iteratively and incrementally. At the end of iteration, the product is released for customer evaluation. The activities of the phase include design, implementation, and testing of the software. Transition: Includes deploying software at the customer site. This phase also includes maintaining the software if faults or errors occur in the software after its deployment.

Business modeling describes the working of the existing processes of the organization and the role of each person involved in the process.

RUP Best Practices


RUP has defined the following six best practices that you should follow in the software development process: Develop software iteratively Manage requirements effectively Use a component-based development approach Visually model the software Verify the software quality Control any changes to the software

Just a minute:

Which of the following phases of RUP includes analyzing the problem domain, developing project plan, and eliminating highest possible risks? 1. Inception 2. Elaboration 3. Construction 4. Transition Answer: 2. Elaboration

www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm

27/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

Summary
In this chapter, you learned that: UML is a standard language for creating blueprints that depict the structure and design of the software system. It is used to specify, visualize, construct, and document the artifacts of a software system. The building blocks of UML consist of basic constituents, relationships, and diagrams. The basic constituents include the structural, behavioral, grouping, and annotational constituents. UML diagrams enable you to visualize the software system by graphical representation of the various constituents. The thirteen UML diagrams are use case, class, object, communication, sequence, state machine, activity, package, component, deployment, timing, composite structure, and Interaction overview. The architecture of a software system can be viewed from the different perspectives of the stakeholders. UML diagrams are used in the analysis and design phases of SDLC. Visio is a tool that can be used to draw UML diagrams. RUP is a software development methodology developed by Rationale Software Corporation, which is now a division of IBM. It is a process framework that helps you to create and deploy software designed using UML.

Exercises

Exercise 1
Technology Systems Inc. decided to create a new computer to provide simulation environment for developing real-time systems. Technology System Inc. would require advanced hardware and operating system to manufacture the new computer. System programs, which provide the interface between the operating system and the hardware, also need to be developed. The company has experienced Java programmers and, therefore, it decides to write the system programs in Java. The Project Manager is aware of the limitations of Java in system programming. The programming team identifies some of the additional features or extensions that need to be embedded in the existing Java compiler for system programming. It is also known that requirements can evolve during the development phase of the project. Other team members are also developing software for the new computer and need the Java compiler to compile the software. Most of these software requirements require few extensions in the Java language to run on a new Operating System. Identify the approach to be used to create the computer.

www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm

28/29

7/21/12

Object-Oriented Analysis and Design Using UML: Student Guide

Reference Links

Overview of UML
Reference Reading: Books The Unified Modeling Language Reference Manual by Grady Booch James RumBaugh Ivar Jacobson Publisher: Pearson Education Reference Reading: URLs http://www-106.ibm.com/developerworks/ rational/library/998.html

Identifying the Types of UML Diagrams


Reference Reading: Books The Unified Modeling Language User Guide by Grady Booch James RumBaugh Ivar Jacobson Publisher: Addison Wesley Reference Reading: URLs http://www-106.ibm.com/developerworks/ rational/library/998.html

www.niitstudent.com/india/Content/063OUML1S1/OEBPS/08_ch02.htm

29/29