Top Banner
Objectives of the Workshop Software development IS moving from traditional structured programming to the Object Oriented paradigm There are many object oriented models but UML IS by far the Most popular and real world modeling tool Exploring thus particular methodology will Benefit academicians in the Object Oriented Software Development Process Most Engineering colleges and Post Graduate colleges are already having OOAD using UML in the curriculum while a lot of Colleges and Universities are looking to introduce it Therefore this course IS being offered to prepare them for these changes Topics What is Modeling Unified Process introduction to UML UML Diagrams 1.Use Case Diagram (Static Diagrams) 2.Class Diagram 3.object diagram 4.Behavior Diagrams (Dynamic Diagrams) 4.l Interaction Diagrams 4.l.l Sequence Diagram 4.l.2 Collaboration Diagram 4.2 State Chart Diagram 4.3 Activity Diagram 5. Implementation Diagram 5.1 Component Diagram 5 2 Deployment Diagram Case Study 1.GATE counseling System 2.Banking System 3.Rallway Reservation System 4.Hotel Management System 5.Llbrary Management System UNIFIED MODELING LANUAGE (UML) DIAGRAMS INTRODUCTION TO UML DIAGRAM The Unified Modeling Language (UML) is a language for specifying constructing visualizing and documenting the artifacts of a software-intensive system Analogous to the use of architectural blue prints m the construction industry UML provides a common language for describing software models and nt can be used m 3njunction with a wide range of software lifecycles and development processes 1 USE CASE DIAGRAM Use Case diagrams Identify the functionality provided by the system (use cases) the users who interact with the system (actors) and the association between the users and the functionality Use Cases are used in the Analysts phase of software development to
18
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Objectlves of the Workshop

Objectives of the WorkshopSoftware development IS moving from traditional structured programming to the Object Oriented paradigm There are many object oriented models but UML IS by far the Most popular and real world modeling tool Exploring thus particular methodology will Benefit academicians in the Object Oriented Software Development ProcessMost Engineering colleges and Post Graduate colleges are already having OOAD using UML in the curriculum while a lot of Colleges and Universities are looking to introduce it Therefore this course IS being offered to prepare them for these changes Topics What is Modeling Unified Process introduction to UML UML Diagrams

1.Use Case Diagram (Static Diagrams)2.Class Diagram3.object diagram4.Behavior Diagrams (Dynamic Diagrams)

4.l Interaction Diagrams4.l.l Sequence Diagram4.l.2 Collaboration Diagram4.2 State Chart Diagram4.3 Activity Diagram

5. Implementation Diagram5.1 Component Diagram5 2 Deployment Diagram

Case Study1.GATE counseling System2.Banking System3.Rallway Reservation System4.Hotel Management System5.Llbrary Management System

UNIFIED MODELING LANUAGE (UML) DIAGRAMSINTRODUCTION TO UML DIAGRAMThe Unified Modeling Language (UML) is a language for specifying constructing visualizing and documenting the artifacts of a software-intensive system Analogous to the use of architectural blue prints m the construction industry UML provides a common language for describing software models and nt can be used m 3njunction with a wide range of software lifecycles and development processes1 USE CASE DIAGRAMUse Case diagrams Identify the functionality provided by the system (use cases)the users who interact with the system (actors) and the association between the users andthe functionality Use Cases are used in the Analysts phase of software development toarticulate the high level requirements of the systemThe primary goals of Use Case diagrams include :1.Providing a high level view of what the system does2.Identifying the users ( actors ) of the system3.Determining areas needing human computer interfacesUse Cases extend beyond pictorial diagrams in tact text based use casedescriptions are often used to supplement diagrams and explore use case functionalityin more detailBasic Use Case Diagram Symbols and NotationsThe basic components of Use Case diagrams are the Actor the Use Case and theAssociationl ActorAn Actor, as mentioned as a user of the system and is depicted using a stuckfigure The role of the user is written beneath the icon Actors are not limited to humansIf a system communicates with another application, and expects input or delivers outputthen that application can also be considered an actor.

Page 2: Objectlves of the Workshop

2 Use CaseA Use Case IS functionality provided by the system typically described asVerb + object (e g Register Car Delete User) Use Cases are depicted with an ellipse Thename of the use case IS written with in the ellipse

3 AssociationAssociations are used to link Actors Will Use Cases, and indicate that an Actorparticipates in the Use Case m some form Associations are depleted by a line connectingthe Actor and the Use Case

4. System Draw your system‘s boundaries using a rectangle that contains use cases. Placeactors outside the system‘s boundaries.

5 RelationshipsThe relationships between an actor and a use case with a simple line Forrelationship indicates that one use case is needed by another in order to perform a taskAn extends relationship indicates alternative options under a certain use case

Examplel Use Case Diagram for Software Selectxon Process

Page 3: Objectlves of the Workshop

2 CLASS DIAGRAMClass diagram are used to dcscnbc the type of objects and lheur relatuonshup byprovldlng a SIBIIC, structural vuew of a system Class duaglams show the classes of theSystem then ll`l|l8ITCl3ll0l`l‘ihlpS (mcludmg mherltance, aggregatlon and association), andthe operauons and attrubutes of the classes Class dlagrams are used for a wlde varnely ofpurposes, meludmg both conceptual/domam modelmg and detallecl desngn modelmg Basic Class Diagram Symbols and Notations1. ClassesThe classes are represented with rectangles divided into compartmentsPlace the name of the class in the first partition (centered bolded and capitalized) listthe attributes in the second partition and write operations into the third

2 Active ClassActive classes initiate and control the flow of activnty whnlepassive classes store data and serve other classes lllustrate active classes with a thickerborder

3.visibilityUse of the visibility markers to signify who can access the informationcontained within a class Private Visibility hides information from anything outside theclass partition Public visibility allows all other classes to view the marked informationProtected visibility allows child classes to access information they Inherited from a parent

Page 4: Objectlves of the Workshop

4.AssociationsAssociations represent static relationships between classes. Placeassociation names above, on, or below the association line. Use a filled arrow to indicatethe direction of the relationship, Place roles near the end of an association. Rolesrepresent the way the two classes see each other.

5 Multiplicity(Cardinality)Place multiplicity notations near the ends of an association Thesesymbols indicate the number of instances of one class linked to one instance ofthe otherclass For example one company will have one or more employees but each employeeworks for one company only

6 Constraintit is a semantic relationship among model elements that speeches conditionsand proportions that must be maintained as true otherwise the system describes model isinvalid The constraints should be placed inside curly braces {}

Page 5: Objectlves of the Workshop

7 Composition and AggregationComposition IS a special type of aggregation thatdenotes a strong ownership between Class A the whole and Class B its part Illustratecomposition with a filled diamondUse a hollow diamond to represent a simple aggregation relationship in which thewhole class plays a more important role than the part class but the two classes arenot dependent on each other The diamond end in both a composition and aggregationrelationship points toward the whole class or the aggregate

8.GeneraIization Generalization is another name for inheritance or an "is a" relationship. ltrefers to a relationship between two classes where one class is a specialized version ofanother. For example, Honda is a type of car. So the class Honda would have ageneralization relationship with the class car.

Example 2 Class Diagram for Software Selection Process

Page 6: Objectlves of the Workshop

3. SEQUENCE DIAIGRAMSequence diagrams document the interactions betweenclasses to achieve a result, such as a use case. Because UML is designed for object-oriented programming, these communications between classes are known as messages.The Sequence diagram lists objects horizontallv and time vertically 'md models thesemessages over timeBasic Sequence Diagram Symbols and Notatlonsln a Sequence diagram classes and actors are listed as columns with verticallifelmes indicating the lifetime of the object ox er time1 ObjectObjects are instances of classes and are arranged horizontally The pictorialrepresentation for an Object is a class (a rectangle) with the name preiixed by the objectname (optional) and a semi-colon

2 ActorAn Actor is modeled using the ubiquitous symbol the stick ligure

3 LifelineThe I tfeltne identifies the existence of the object over time The notation for aLifeline ts a vertical dotted llne extending from an obtect

Page 7: Objectlves of the Workshop

4 Activation BarActivations, modeled as rectangular boxes on the hfelme, mdncate when theobject is performlng an actlon

5 MessageMessages modeled as honzontal arrows between Actlvatuons mdlcate ecommunleauons betvseen ob|ects

6. Destroying ObjectsObjects can be terminated early using an arrow labeled "< < destroy > >" that points to an X.

Page 8: Objectlves of the Workshop

7 LoopsA uepetmon or loop wntlun a sequence dlagi am ns depicted as a rectangle Placethe condition for exmng the loop at the bottom left corner in square buckets [ ]comhtmonh en

Page 9: Objectlves of the Workshop

4 COLLABORATION DIAGRAMA collaboratlon dtagram ts an mteraetnon dtagram thatemphasizes the structural orgamzatton of the objects that send and recewe messages It nscrossed between a symbol dlagram and sequence cllagram The numbered arrows showthe movement of messagesBasac eollaboratlon Diagram S\ mbols and Notatlons1 Class rolesClass roles descrtbe how objects behave. Use the UML object symbol toillustrate class roles, but don't list object attributes.

2 Assocratlon rolesAssoclatron roles descrrbe how an assocrauon wull behave given apartlcular srtuatlon You can draw assocuatron roles usmg s|mple hnes labeled wrthstereotvpes

3 MessagesUnhke sequence dragrams, collaborauon daagrarns do not have an exphcrtway to denote time and rnstead number messages rn order of execution Sequencenurnbermg can become nested usrng the Dewey decrmal system For example, nestedmessages under the first message are labeled l l l 2 l 3 and so on The condmon for amessage IS usually placed rn square brackets |mmed|a\eI} follownng the sequencenumber Use a "‘ after the sequence number to rndrcate a loop

Example 4 Collaboration Diagram for Software Selection

Page 10: Objectlves of the Workshop

5 STATE DIAGRAMThe State chart diagram describes the behavior of a single object class, especiallyif the classes illustrate significant dynamic behavior State chart/ state transition diagramfor those types of classes lt shows the a life hlstorw of a given class, the events thatcauses a transition from one state to another, and the action that results from a statechangeStates are represents as rounded rectangles (rectangles with smoothedges), each state has a unique identifying name0 A state may contains three compartment shows the name of the state, theoptional state variables and action performed0 An object is not always m the same state at all times, and an object cannotbe in an unknown or undefined state.

Elements of State Client Diagram1. Object StateObject State is a state of an object at given point in time

2. State of Object with three compartments

Page 11: Objectlves of the Workshop

5. Transition Transition occurs when dynamic conditions evolve or objects change their state by following the rules specified in the state machine associatedto their classes. State chart diagrams are directed graph. State are linkedvia unidirectional connections called transitions.

Example 5 State Chart Dlagram for TPO Object

6 ACTIVITY DIAGRAMActnvny dlagrams ale used to document workflows nn a systemfrom the busmess level down to the operatuonal level When lookmg at an Actuvnyduagram, youll notnce elements from State dnagrams In fact the Acttvtty dmagram us avartatton of the state duagram where the "states" represent operatnons, and the transtttonsrepresent the acttvmes that happen when the operataon ns complete The general purpose

Page 12: Objectlves of the Workshop

of Acttvlty dlagrams ts to focus on flows druven by Internal pweessmg vs externalevents.

Basic Activity Diagram Symbols and Notationsl. Activity StatesActivity states mark an action by an object. The notations for these statesare rounded rectangles, the same notatlon as found in State chart diagrams.ACIIOD Slile

2 TransmonWhen an ACTIVITY State IS completed processing moves to anotherActwtty State Transnuons are used to mark thus movement Transntlons are modeledusmg arrows

3 Swlm laneSwnm lanes dnvude acm mes accordmg to objects by arranging objects an columnformat and placing actnvnttcs by that object wnthm that column Objects are lasted at thetop of the column and vertncal bars separate the columns to form the su nm lanes

4 lmtlal StateThe lmtual State marks the entry point and the lflllliil Activa) State Thenotation for the lmual State ns the same ‘ts m State chan diagrams a sohd cnrcle Therecan only be one lnnnal State on a diagram

5. Final StateFinal States mark the end of the modeled workflow, There can be multipleFinal States on a diagram, and these states are modeled using a solid circle surrounded byanother circle.

6 Synchronization BarActivities olien can be done in parallel To split processing( fork ), or to resume processing when multiple activities have been completed ( _|o\n '),Synchronization Bars are used These are modeled as solid rectangles, with multipletransitions going in and/or out ° r

Page 13: Objectlves of the Workshop

7 BranchingA diamond represents a decision with alternate paths. The outgoing altemates should be labeled with a condition or guard expression You can also label one ol the paths else

Example 6 Actlvlty Dlagram for Software Seleetlon Process

Page 14: Objectlves of the Workshop

7 COMPONENT DIAGRAMComponent dragrams fall under the category of anlmplementauon dtagnam a kmd ot claamam that models the tmplementatton anddeployment ot the system A Component Dnagram m partneular ns used to descrube thedependencles between vartous soi`tw'\re components such as the dependency betweenexecutable tiles and source files Thus mlormatuon ns snmnlar to that wnthm make fileswhlch deserlbe souroe code dependencnes and can be used to properly eompnle anapplication.Basic component Diagram Symbols and Notations1. ComponentA component represents a software entity in a system. Examples include source code files, programs, documents, and resource files. A component is represented using a rectangular box, with two rectangles protruding from the left side, as seen in the image to the right.

2 DependencyA Dependency is used to model the relatlonshlp between two components The notatlon for a dependency relationship |s a dotted arrow pointing from a component to the component it depends on

Page 15: Objectlves of the Workshop

3 InterfaceAn interface describes a group of operations used or created bw components

Page 16: Objectlves of the Workshop