1 Building an Analysis Model of the System Under Development.

Slides:



Advertisements
Similar presentations
System Sequence Diagrams
Advertisements

© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
1 UML--definition UML: stands for "unified modeling language” unifies methods of Booch, Rumbaugh (OMT or Object Modeling Technique), and Jacobson (OOSE.
Software Engineering COMP 201
1 Building an Analysis Model of the System Under Development.
Systems Analysis and Design in a Changing World, Fourth Edition
Summary Class responsibility cards can be used to help allocate responsibilities between different classes. The use of stereotype classes, such as entity,
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
Lecture 4 Class Responsibility Collaboration Cards
Essentials of interaction diagrams Lecture 23 & 24.
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
The Object-oriented Paradigm and The Unified Modeling Language (UML)
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
1 Decomposing the System Requirements  Specifications (Use cases)  Design --classes **entity **boundary **control --sequence diagrams --CRC cards **responsibilites.
© Copyright Eliyahu Brutman Programming Techniques Course.
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
Embedded Systems Software: Modeling and Programming--
UML for Embedded Systems Development--Revisited. table_05_00 * * * * *
UML for Embedded Systems Development— Extensions; Hardware-Software CoDesign.
SE-565 Software System Requirements More UML Diagrams.
Object-oriented design Part 4: More UML. Interfaces An interface is a language construct specific to Java Java does not support multiple inheritance Interfaces.
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
Chapter 7: The Object-Oriented Approach to Requirements
Chapter 2 (Horstmann’s Book) – Part 2 The Object-Oriented Design Process Hwajung Lee.
Object-Oriented Design & Patterns Cay S
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
(C) 2009 J. M. Garrido1 Object Oriented Simulation with Java.
1 Object-Oriented Modeling Using UML (2) CS 3331 Fall 2009.
Big Java Chapter 12. Software Process - Waterfall Analysis Design Implementation Testing Deployment Does not work well when rigidly applied! established.
High-Level Design With Sequence Diagrams COMP314 (based on original slides by Mark Hall)
The Object-Oriented Approach to Requirements
Systems Analysis and Design in a Changing World, Fifth Edition
1 On to Object Design Chapter 14 Applying UML and Patterns.
Systems Analysis and Design in a Changing World, 6th Edition
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
1 Embedded Systems Software: Modeling and Programming-- The Object-oriented Paradigm and The Unified Modeling Language (UML); Extensions to HW / SW Systems.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML: Review Session (Optional)
UML Use Case Diagramming Guidelines. What is UML? The Unified Modeling Language (UML) is a standard language for specifying, visualizing, constructing,
Chapter 8 Analysis & Modeling. Data Modeling examines data objects independently of processing focuses attention on the data domain creates a model at.
The Static Analysis Model Class Diagrams Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
The Unified Modeling Language Part II Omar Meqdadi SE 2730 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Interaction Diagrams Interaction Diagrams allow the designer to show how groups of objects collaborate in some behavior. –Interaction Diagrams will show.
CS 151: Object-Oriented Design September 5 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron Mak
CSCI-383 Object-Oriented Programming & Design Lecture 12.
Chapter 17 – Object- Oriented Design. Chapter Goals To learn about the software life cycle To learn about the software life cycle To learn how to discover.
ITEC324 Principle of CS III Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
Systems Analysis and Design in a Changing World, Fourth Edition
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Object-Oriented Systems Analysis and Design Using UML Systems Analysis and Design,
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 10: Statecharts.
Chapter 3: Introducing the UML
McGraw-Hill/Irwin© 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 17 Object-Oriented Design and Modeling Using the UML.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
1 7 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 7 The Object-Oriented Approach to Requirements.
Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 14 Slide 1 Object-Oriented Design.
Systems Analysis and Design in a Changing World, Fourth Edition
Standard UML: Communication and Dynamic Behavior
Unified Modeling Language
IMAT5205 Systems Analysis and Design
Building an Analysis Model of the System Under Development
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
Decomposing the System
ITEC324 Principle of CS III
Presentation transcript:

1 Building an Analysis Model of the System Under Development

2 Developing your design from the product specifications: Remember there is probably not a UNIQUE GOOD DESIGN for a given set of specifications But there are many BAD designs The goal of the design stage is to come up with a good design and to avoid bad design choices We will use some of the UML tools to explore the design and test out our design choices with respect to the specifications we are given, before we invest time and energy in actual coding.

3 Question: How do you start an OO design? --components? --objects? --how will they interact? Answer: One common method is to start with components, along with any design patterns which can be identified. In general: design is an iterative process all team members should take an active part in exploring possible designs simple designs are preferable to complex designs--but it may take several iterations to develop a simple design which meets the project requirements As explained previously, we will use a subset of UML to do the project design.

4 Analysis model (UML version): --functional model (use cases and scenarios) --analysis object model (static: class and object diagrams) --dynamic model (state and sequence diagrams) As system is analyzed, specifications are refined and made more explicit; if necessary, requirements are also updated

5 Figure 5-19 of text: an activity diagram for analyzing the system you are building:

6 Arms/disarms system Accesses system via internet Responds to alarm event Encounters an error condition Reconfigures sensors and related system features Homeowner System administrator Sensors Pressman, p. 163, Figure 7.3 “Review”: use case:Graphical description: Text description: Use case name Participating actors Flow of events Entry condition(s) Exit condition(s) Quality requirements

7 Class and object diagrams: Identify Objects from Use Case Specifications: USE ENDUSER’s TERMS AS MUCH AS POSSIBLE Entity objects: “things”, for example: --nouns (customer, hospital, infection) --real-world entities (resource, dispatcher) --real-world activities to be tracked (evacuation_plan) --data sources or sinks (printer) Boundary objects: system interfaces, for example: --controls (report(emergencybutton) --forms (savings_deposit_form) --messages (notify_of_error) Control objects: usually one per use case --coordinate boundary and entity objects in the use case Use the identified objects in a sequence diagram to carry out the use case

8 Common classes Other common types of classes which the developer can look for include: tangible things, e.g., Mailbox, Document system interfaces and devices, e.g., DisplayWindow, Input Reader agents, e.g., Paginator, which computes document page breaks, or InputReader events and transactions, e.g., MouseEvent,CustomerArrival users and roles, e.g., Administrator, User systems, e.g., mailsystem (overall), InitializationSystem (initializes) containers, e.g., Mailbox, Invoice, Event foundation classes, e.g., String, Date, Vector, etc.

9 Sequence Diagram Sequence Diagram: a sequence diagram also models dynamic behavior typically a sequence diagram shows how objects act together to implement a single use case messages passed between the objects are also shown sequence diagrams help to show the overall flow of control in the part of the program being modeled they can also be used to show: concurrent processes asynchronous behavior

10 Sequence Diagram--Syntax Objects in the sequence diagram are shown as boxes at the top below each object is a dashed vertical line--the object’s “lifeline” an arrow between two lifelines represents each message arrows are labeled with message names and can also include information on arguments and control information two types of control: condition, e.g., [is greaterthan zero] iteration, e.g., *[for all array items] “return” arrows can also be included

11 Sequence Diagram Example— text, chapter 5

showing a branch in a UML sequence diagram: condition-on-a-sequence-diagram 12

Looping in a sequence diagram: 10.html 13

Example: sequence diagram for example use case developed in last class 14

15 ER diagrams Useful object relationships These diagrams represent the relationships between the classes in the system. These represent a static view of the system. There are three basic types of relationship: inheritance ("is-a") (NOT the same as use case inheritance) aggregation ("has-a”) association ("uses") These are commonly diagrammed as follows:

16 ER diagram: is-a is-a: draw an arrow from the derived to the base class: manager employee

17 ER diagram--has-a has-a: draw a line with a diamond on the end at the "container" class. Cardinalities may also be shown (1:1, 1:n, 1:0…m; 1:*, i.e., any number > 0, 1:1…*, i.e., any number > 1): car tire 1 4 tire & car can exist independently —shared aggregation person arm 1 2 arm is part of the person– composition aggregation

18 ER diagram--uses uses or association: there are many ways to represent this relationship, e.g., cargasstation company employee employs works for * 1 * n 1 *

19 CRC cards CRC cards: class--responsibilities--collaborators cards "responsibilities" = operators, methods "collaborators" = related classes (for a particular operator or method) Make one actual card for each discovered class, with responsibilities and collaborators on the front, data fields on the back. CRC cards are not really part of UML, but are often used in conjunction with it. The CRC card contains information about what is inside the class (data, structures, methods).

20 CRC card--example Example (based on Horstmann, Practical Object-Oriented Development in C++ and Java): frontback Class Mailbox OperationsRelationships (Responsibilities)(Collaborators) get current messageMessage, Messagequeue play greeting Queue of new messages Queue of kept messages Greeting Extension number Passcode Class Mailbox Note: Bruegge & Dutoit DO NOT include CRC cards—(they do show some internal information on their “class” boxes)—YOU NEED TO USE CRC CARDS, they provide more information

21 State Diagram State Diagram: another way of adding detail to the design--models dynamic behavior describes all the possible states a particular object can be in and how that object's state changes as a result of events that affect that object usually drawn for a single class to show behavior of a single object used to clarify dynamic behavior within the system, as needed

22 State Diagram--Properties A state diagram contains a "start" point, states, and transitions from one state to another. Each state is labeled by its name and by the activities which occur when in that state. Transitions can have three optional labels: Event [Guard] / Action. A transition is triggered by an Event. If there is no Event, then the transition is triggered as soon as the state activities are completed. A Guard can be true or false. If the Guard is false, the transition is not taken. An Action is completed during the transition.

23 State Diagram--Example Example: this state diagram example for an "order" in an order- processing system is from Fowler and Scott, UML Distilled (Addison-Wesley, 1997): Checking check item Dispatching initiate delivery Waiting Delivered start /get first item [not all items checked] /get next item [all items checked && all items available] [all items checked && some items not in stock] item received [some items not in stock] item received [all items in stock] delivered

24 Example—bank simulation (Horstmann) Teller 1 Teller 2 Teller 3 Teller 4 Customer 1Customer 3Customer 2 Horstmann, Mastering Object- Oriented Design in C++, Wiley, 1995

25 Example—bank simulation (Horstmann), cont. An initial solution (Horstmann, p. 388): Event Departure Arrival Customer Bank EventQueue Application Bank Statistics

26 Example—bank simulation (Horstmann), cont. An improved solution (Horstmann, p. 391): Event Departure Arrival Customer Bank EventQueue Simulation Bank Statistics

27 Comparison What simplifications have been made? Why? Event Departure Arrival Customer Bank EventQueue Application Bank Statistics Event Departure Arrival Customer Bank EventQueue Simulation Bank Statistics

28 Example (revisited): How would we use the tools described so far to design a “state-of- the art” vending machine? How would we develop test cases at each stage? Use cases? Class diagram? Sequence diagram? Classes / CRC cards?