Download presentation
Presentation is loading. Please wait.
Published byJocelyn Fitzgerald Modified over 9 years ago
1
Slide 10A.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Object-Oriented Systems Analysis and Design Mr Gavuna gavuna@tum.ac.ke
2
Slide 10A.2 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter Overview UML Is Not a Methodology Class Diagrams Notes Use-Case Diagrams Stereotypes Interaction Diagrams Statecharts Activity Diagrams Packages Component Diagrams
3
Slide 10A.3 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter Overview (contd) Deployment Diagrams Review of UML Diagrams UML and Iteration
4
Slide 10A.4 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. The Current Version of UML Like all modern computer languages, UML is constantly changing –When this book was written, the latest version of UML was Version 1.4 –By now some aspects of UML may have changed UML is now under the control of the Object Management Group (OMG) –Check for updates at the OMG Web site, www.omg.org
5
Slide 10A.5 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. UML Is Not a Methodology UML is an acronym for Unified Modeling Language –UML is therefore a language A language is simply a tool for expressing ideas
6
Slide 10A.6 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. UML Is Not a Methodology UML is a notation, not a methodology –It can be used in conjunction with any methodology UML is not merely a notation, it is the notation UML has become a world standard –Every information technology professional today needs to know UML
7
Slide 10A.7 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. UML Is Not a Methodology (contd) UML is a language The English language has over 100,000 words –We can manage fine with just a subset The small subset of UML presented in Chapters 3 through 9 is adequate for the purposes of this book The larger subset of UML presented in this chapter is adequate for the systems analysis and design of most information systems
8
Slide 10A.8 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. UML Is Not a Methodology (contd) UML can be used for modeling all kinds of software –This book is on systems analysis and design, not the full life cycle –This book is on information systems, not other types of software Those features of UML most appropriate for the systems analysis and design of information systems are included in this book
9
Slide 10A.9 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Class Diagrams A class diagram depicts classes, attributes, & operations or methods and their interrelationships A class is shown as a rectangle. Here is the simplest possible class diagram
10
Slide 10A.10 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Class Diagrams (contd) Class diagram showing more details of Bank Account Class Add as many (or as few) details as appropriate for the current iteration and incrementation
11
Slide 10A.11 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Class Diagram: Attributes (contd) Attributes are either: – Private (the norm), indicated by a minus sign. – Public, indicated by a plus sign. – Protected, indicated by a pound sign (#). – Attributes may include the type of data and any initial value. Methods are usually public.
12
Slide 10A.12 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Class Diagrams: Notation (contd) Freedom of notation extends to objects Example: –bank account : Bank Account Class Bank account is an object, an instance of a class Bank Account Class –The underlining denotes an object –The colon denotes “an instance of” –The bold face and initial upper case letters in Bank Account Class denote that this is a class
13
Slide 10A.13 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Class Diagrams: Notation (contd) UML allows a shorter notation when there is no ambiguity –bank account
14
Slide 10A.14 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Class Diagrams: Notation (contd) The UML notation for modeling the concept of an arbitrary bank account is –: Bank Account Class The colon means “an instance of,” so : Bank Account Class means “an instance of class Bank Account Class” This notation has been widely used in the interaction diagrams of Chapters 6 and 7
15
Slide 10A.15 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Class Diagrams: Visibility Prefixes (contd) UML visibility prefixes (used for information hiding) –Prefix + indicates that an attribute or operation is public »Visible everywhere –Prefix – denotes that the attribute or operation is private »Visible only in the class in which it is defined –Prefix # denotes that the attribute or operation is protected »Visible either within the class in which it is defined or within subclasses of that class
16
Slide 10A.16 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Class Diagrams: Visibility Prefixes (contd) Example: –Class diagram with visibility prefixes added –Attribute accountBalance is visible only within the Bank Account Class –Operations deposit and withdraw are accessible from anywhere within the information system
17
Slide 10A.17 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Types of Classes Classes fall into several categories: – Entity classes. – Boundary or interface classes. – Abstract classes. – Control classes. Each class may use a special symbol, called a UML stereotype.
18
Slide 10A.18 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Entity Classes Entity classes represent real-world items. Attributes are those stored for the entity. Methods work with the entity.
19
Slide 10A.19 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Boundary or Interface Classes Provide a means for users to work with the system. Display screens, windows, dialogue boxes, touch-tone telephone, external systems. Methods required to send or reset the display screen, or to produce a report.
20
Slide 10A.20 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Abstract Classes Abstract classes are the parent or general class in a generalization/specialization relationship. Abstract classes may not be directly instantiated. Only the child classes can create objects.
21
Slide 10A.21 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Control or Active Classes Control or active classes are used to control the flow of activities. Many small control classes may be included to achieve reuse. Attributes are those needed temporarily by the control class. Methods are those used in control activities.
22
Slide 10A.22 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Relationships on a Class Diagram Relationships are the connections between classes and include: -Associations -Aggregation -Collection -Composition
23
Slide 10A.23 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Association Example of association:
24
Slide 10A.24 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Association (contd) The association between the two classes may be modeled as a class –Example: Suppose the radiologist consults the lawyer on a number of occasions, each one for a different length of time »A class diagram is needed such as that depicted in the next slide
25
Slide 10A.25 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Association (contd) Now consults has become a class, Consults Class, which is called an association class –Because it is both an association and a class
26
Slide 10A.26 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Association Class Example
27
Slide 10A.27 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Aggregation Aggregation is a “has a” relationship. It is one of three types of whole/part relationships The whole is composed of the sum of the parts. If the whole is removed, the part may still exist. The diamond at the end of the line is not filled in.
28
Slide 10A.28 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Aggregation Example: “A car consists of a chassis, an engine, wheels, and seats”
29
Slide 10A.29 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Aggregation (contd) The open diamonds denote aggregation –Aggregation is the UML term for the part–whole relationship The diamond is placed at the “whole” (car) end, not the “part” (chassis, engine, wheels, or seats) end of the line connecting a part to the whole
30
Slide 10A.30 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Multiplicity Example: “A car consists of one chassis, one engine, 4 or 5 wheels, an optional sun roof, zero or more fuzzy dice hanging from the rear-view mirror, and 2 or more seats”
31
Slide 10A.31 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Multiplicity (contd) The numbers next to the ends of the lines denote multiplicity –The number of times that the one class is associated with the other class
32
Slide 10A.32 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Multiplicity (contd) Item 1: –The line connecting Chassis Class to Car Class »The 1 at the “part” end of the line denotes that there is one chassis involved »The 1 at the “whole” end denotes that there is one car involved –Each car has one chassis, as required –Similar observations hold for the line connecting Engine Class to Car Class
33
Slide 10A.33 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Multiplicity (contd) Item 2: –The line connecting Wheels Class to Car Class »The 4..5 at the “part” end together with the 1 at the “whole” end denotes that each car has from 4 to 5 wheels (the fifth wheel is the spare) –A car has 4 or 5 wheels, as required »Instances of classes come in whole numbers only
34
Slide 10A.34 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Multiplicity (contd) Item 3: –The line connecting Sun Roof Class to Car Class »Two dots.. denote a range, so the 0..1 means zero or one, the UML way of denoting “optional” –A car has an optional sun roof, as required
35
Slide 10A.35 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Multiplicity (contd) Item 4: –The line connecting Fuzzy Dice Class to Car Class »The * by itself means zero or more –Each car has zero or more fuzzy dice hanging from the rear-view mirror, as required
36
Slide 10A.36 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Multiplicity (contd) Item 5: –The line connecting Seats Class to Car Class »An asterisk in a range denotes “or more,” so the 2..* means 2 or more –A car has two or more seats, as required
37
Slide 10A.37 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Multiplicity (contd) If the exact multiplicity is known, use it –Example: The 1 that appears in 8 places If the range is known, use the range notation –Examples: 0..1 or 4..5 If the number is unspecified, use the asterisk –Example: * If the range has upper limit unspecified, combine the range notation with the asterisk notation –Example: 2..*
38
Slide 10A.38 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Collection Consists of a whole and its members Examples are a library with books or a voting district with voters If the part is removed, the whole retains its identity A weak association
39
Slide 10A.39 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Composition The whole has a responsibility for the parts, and is a stronger relationship. If the whole is removed, the parts are removed Shown with a filled-in diamond on the line Example: an insurance policy with riders
40
Slide 10A.40 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Composition (contd) Aggregation example: Every chess board consists of 64 squares This relationship goes further –It is an instance of composition, a stronger form of aggregation
41
Slide 10A.41 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Composition (contd) Association –Models the part–whole relationship Composition –Also models the part–whole relationship –In addition, every part may belong to only one whole –If the whole is deleted, so are the parts Example: A number of different chess boards –Each square belongs to only one board –If a chess board is thrown away, all 64 squares on that board go as well
42
Slide 10A.42 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Composition (contd) Composition is depicted by a solid diamond
43
Slide 10A.43 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Generalization/Specialization Diagrams Generalization/specialization or gen/spec diagrams show the relationship between a more general thing and a specific kind of thing. This relationship is described as an “is a” relationship. For example: a car is a vehicle, a truck is a vehicle. Generalization relationship is used to model inheritance. General class is a parent, base, or superclass. Specialized class is a child, derived, or subclass.
44
Slide 10A.44 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Generalization Every instance of Asset Class or its subclasses has an attribute assetType (the discriminator) –This attribute can be used to distinguish between instances of the subclasses
45
Slide 10A.45 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Generalization/Specialization Example
46
Slide 10A.46 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Inheritance Inheritance is a required feature of object orientation Inheritance is a special case of generalization –The UML notation for generalization is an open triangle –Sometimes the open triangle is labeled with a discriminator
47
Slide 10A.47 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Notes A comment in a UML diagram is called a note –A rectangle with the top right-hand corner bent over –A dashed line is drawn from the note to the item to which the note refers
48
Slide 10A.48 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Use-Case Diagrams A use case is a model of the interaction between –External users of an information system (actors) and –The information system itself »More precisely, an actor is a user playing a specific role A use case describes what the system does, not how it does the work. The use case model reflects the view of the system of the user outside of the system. A use-case diagram is a set of use cases Symbols are: –Actor, a stick figure. –Use case, an oval. –Connecting lines.
49
Slide 10A.49 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Use-Case Diagrams (contd) Generalization of actors is supported –The open triangle points toward the more general case
50
Slide 10A.50 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Use-Case Diagrams: Actors Represent role played by one or more users Exist outside of the system May be a person, another system, a device, such as a keyboard or Web connection Can initiate an instance of a use case May interact with one or more use cases and a use case may involve one or more actors Actors may be divided into two groups: –Primary actors supply data or receive information from the system –Secondary actors help to keep the system running or provide help »Help desk, analysts, programmers, etc.
51
Slide 10A.51 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Use Case Consists of three things: –An actor (user) that initiates an event. –An event that triggers a use case. –The use case that performs the actions triggered by the event. Better to create fewer use cases 20 use cases for a large system 50 use cases would be the maximum for a large system Can nest use cases, if needed
52
Slide 10A.52 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Use Case Relationships Communicates –Connect an actor to a use case Includes –Use case contains a behavior that is common to more than one use case. –The common use case is included in other use cases. –Dotted arrow points toward common use case. Extends –A different use case handles variations or exceptions from the basic use case. –Arrow goes from extended to basic use case. Generalizes –One thing is more general than another thing. –Arrow points to the general thing.
53
Slide 10A.53 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Use Case Relationships
54
Slide 10A.54 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Steps for Creating a Use Case Model The steps required to create a use case model are: –Review the business specifications and identify the actors within the problem domain. –Identify the high-level events and develop the primary use cases that describe the events and how actors initiate them. –Review each primary use case to determine possible variations of flow through the use case. –Develop the use case documents for all primary use cases and all important use case scenarios.
55
Slide 10A.55 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Use Case Scenario A use case scenario may be created for the standard flow through the use case. Other scenarios may be created for variations on the main flow. A use case includes: –Use case identifiers and initiators. –Steps performed. –Conditions, assumptions, and questions.
56
Slide 10A.56 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Stereotypes A stereotype in UML is a way of extending UML Stereotypes already encountered include –Boundary, control, and entity classes, and –The «include» stereotype The names of stereotypes appear between guillemets –Example: «This is my own construct»
57
Slide 10A.57 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Stereotypes (contd) Example: Use case Estimate Funds Available for Week incorporates use case Estimate Investment Income for Week
58
Slide 10A.58 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Stereotypes (contd) In the «extend» relationship, one use case is a variation of the standard use case –Example: A separate use case to model the situation of the potential seller of a painting turning down Osbert’s offer –The open-headed arrow goes in the other direction
59
Slide 10A.59 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Interaction Diagrams Interaction diagrams show how objects interact with one another UML supports two types of interaction diagrams –Sequence diagrams –Collaboration diagrams
60
Slide 10A.60 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Sequence Diagrams Sequence diagrams show a succession of interactions between classes or object instances over time. It also shows the processing described in a single scenario. The leftmost object is the starting object. Time sequence is from top to bottom. Horizontal arrows represent messages or signals sent between classes. –Solid arrowheads represent synchronous calls, the sending class waits for a response. –Half or open arrowheads represent asynchronous calls, those sent without waiting for a returning signal.
61
Slide 10A.61 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Sequence Diagrams (contd) Example: Dynamic creation followed by destruction of an object
62
Slide 10A.62 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Sequence Diagrams (contd) The lifelines in the sequence diagram –An active object is denoted by a thin rectangle (activation box) in place of the dashed line Creation of the : Masterpiece Class object is denoted by the lifeline starting at the point of dynamic creation Destruction of that object after it receives message »9: Destroy object is denoted by the heavy X
63
Slide 10A.63 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Sequence Diagrams (contd) A message is optionally followed by a message sent back to the object that sent the original message Even if there is a return, it is not necessary that a specific new message be sent back –Instead, a dashed line ending in an open arrow indicates a return from the original message, as opposed to a new message Message names may be in the following formats: »messageName() »messageName(parameter1, parameter2, …) »messageName(parameterType:parameterName)(defaultValue)
64
Slide 10A.64 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Sequence Diagrams (contd) There is a guard on the message »9: [offer rejected] Destroy object –Only if Osbert’s offer is rejected is message 9 sent A guard (condition) is something that is true or false –The message sent only if the guard is true The purpose of a guard –To ensure that the message is sent only if the relevant condition is true
65
Slide 10A.65 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Sequence Diagrams (contd) Iteration an indeterminate number of times is modeled by an asterisk (Kleene star) Example: Elevator (see next slide) »*move up one floor –The message means: “move up zero or more floors”
66
Slide 10A.66 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Sequence Diagrams (contd) Sequence diagram for elevator
67
Slide 10A.67 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Sequence Diagrams (contd) An object can send a message to itself –A self-call Example: –The elevator has arrived at a floor –The elevator doors now open and a timer starts –At the end of the timer period the doors close again –The elevator controller sends a message to itself to start its timer — this self-call is shown in the previous UML diagram
68
Slide 10A.68 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Sequence Diagram Example
69
Slide 10A.69 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Collaboration Diagrams Collaboration diagrams are equivalent to sequence diagrams –All the features of sequence diagrams are equally applicable to collaboration diagrams Use a sequence diagram when the transfer of information is the focus of attention Use a collaboration diagram when concentrating on the classes
70
Slide 10A.70 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts Statechart with guards
71
Slide 10A.71 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd) An event also causes transitions between states Example: The receipt of a message
72
Slide 10A.72 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd) The elevator is in state Elevator Moving –It performs operation »Move up one floor while guard [no message received yet] remains true, until it receives the message »Elevator has arrived at floor
73
Slide 10A.73 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd) Receipt of this message (event) causes the guard to be false It also enables a transition to state Stopped at Floor –In this state, activity »Open the elevator doors is performed
74
Slide 10A.74 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd) The most general form of a transition label is »event [guard] / action –If »event has taken place and »[guard] is true, the transition occurs, and, while it is occurring, »action is performed
75
Slide 10A.75 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd) Equivalent statement with most general transition
76
Slide 10A.76 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd) The transition label is –Elevator has arrived at floor [a message has been received] / Open the elevator doors The guard –[a message has been received] is true when the event –Elevator has arrived at floor has occurred and the message has been sent The action to be taken is –Open the elevator doors
77
Slide 10A.77 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd) There are two places where an action can be performed in a statechart –When a state is entered »Activity –As part of a transition »Action
78
Slide 10A.78 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd) An event can be specified in terms of words like “when” or “after” Example: – When (cost > 1000) or after (2.5 seconds)
79
Slide 10A.79 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd) Superstates combine related states
80
Slide 10A.80 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd) States A, B, C, and D all have transitions to Next State Combine them into superstate ABCD Combined –Now there is only one transition –The number of arrows is reduced from four to only one States A, B, C, and D all still exist in their own right
81
Slide 10A.81 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Example: Four states are unified into MSG Combined Statecharts (contd)
82
Slide 10A.82 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Activity Diagrams Activity diagrams show the sequence of activities in a process, including sequential and parallel activities. They show how various events are coordinated »Used when activities are carried on in parallel Example: –One diner orders chicken, the other fish –The waiter writes down their order, and hands it to the chef –The meal is served only when both dishes have been prepared
83
Slide 10A.83 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Activity Diagram Symbols
84
Slide 10A.84 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Activity Diagrams (contd) Example:
85
Slide 10A.85 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Activity Diagrams (contd) A fork has –One incoming transition, and –Many outgoing transitions, each of which starts an activity to be executed in parallel with the other activities A join has –Many incoming transitions, each of which lead from an activity executed in parallel with the other activities, and –One outgoing transition that is started when all the parallel activities have been completed
86
Slide 10A.86 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Activity Diagrams (contd) Example: A company that assembles computers as specified by the customer
87
Slide 10A.87 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Activity Diagrams (contd) The three departments involved –Assembly Department –Order Department –Accounts Receivable Department are each in their own swimlane
88
Slide 10A.88 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Activity Diagrams: Swimlanes Included on activity diagrams to show partitioning Show which activities: –Occur on a browser –Occur on a server –Happen on a mainframe Are done by external partners Help to divide tasks among team members
89
Slide 10A.89 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Activity Diagrams: Swimlane Boundaries When an event crosses swimlane boundaries, data must be transmitted. –A Web form is sent to a server. –Data are placed into middleware to transmit it between a server and a mainframe. –Data are transmitted to and from an external partner.
90
Slide 10A.90 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Packages A large information system is decomposed into relatively independent packages UML notation for a package
91
Slide 10A.91 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Packages (contd) Example showing the contents of My Package
92
Slide 10A.92 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Component Diagrams A component diagram shows dependencies among software components, including –Source code –Compiled code –Executable load images
93
Slide 10A.93 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Component Diagrams (contd) Example: –Programmers write source code in an object-oriented language »C++ or Java –The source code is translated by a compiler into compiled code »(The binary code that is the only language a computer understands) –The compiled code for each module is combined with run- time routines to produce an executable load image (that is, a program)
94
Slide 10A.94 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Component Diagrams (contd) Example:
95
Slide 10A.95 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Deployment Diagrams A deployment diagram shows on which hardware component each software component is installed (or deployed) It also shows the communication links between the hardware components
96
Slide 10A.96 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Deployment Diagrams (contd) Example:
97
Slide 10A.97 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Review of UML Diagrams Some diagrams that could be confused include: –A use case models the interaction between actors and the information system –A use-case diagram is a single diagram that incorporates a number of use cases –A class diagram is a model of the classes showing the static relationships between them »Including association and generalization
98
Slide 10A.98 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Review of UML Diagrams A statechart shows –States (specific values of attributes of objects) –Events that cause transitions between states (subject to guards), and –Actions taken by objects An interaction diagram (sequence diagram or collaboration diagram) shows how objects interact as messages are passed between them An activity diagram shows how events that occur at the same time are coordinated
99
Slide 10A.99 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. UML and Iteration Every UML diagram consists of a small required part plus any number of options –Not every feature of UML is applicable to every information system –To perform iteration and incrementation, features have to be added stepwise to diagrams This is one of the many reasons why UML is so well suited to the Unified Process
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.