Example: object diagram for Scheduler, v0.0.0. What is wrong with this diagram? Seems like a lot of similarity between Task and UnplannedTask Can use.

Slides:



Advertisements
Similar presentations
Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
Advertisements

Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
Conversation Form l One path through a use case that emphasizes interactions between an actor and the system l Can show optional and repeated actions l.
Use-case Modeling.
Conquering Complex and Changing Systems Object-Oriented Software Engineering TJSS System Design Lecture 12 Päivi Ovaska.
Systems Analysis and Design in a Changing World, Fourth Edition
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.
Use Case Modeling Written by: Zvika Gutterman Adam Carmi.
Use Case Modeling Written by: Zvika Gutterman Adam Carmi.
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
1 Objectives To introduces the concept of software Design. To introduce the concept of Object- Oriented Design (OOD). To Define various aspects about object.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented design 2.
1 Lecture 2: Elaboration Tasks and Domain Modeling.
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
Copyright W. Howden1 Lecture 2: Elaboration Tasks and Domain Modeling.
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
Use Case Analysis – continued
SE-565 Software System Requirements More UML Diagrams.
Chapter 7: The Object-Oriented Approach to Requirements
Objectives Design Class Diagrams Issues in system design Generalization Review UML papers.
USE Case Model.
Objects What are Objects Observations
Requirements Elicitation. Requirement: a feature or constraint that the system must satisfy Requirements Elicitation: specification of the system that.
Why Analysis Process Refer to earlier chapters Models what the system will do makes it easier for understanding no environment considered (hence, system.
Systems Analysis and Design in a Changing World, Fifth Edition
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
Interaction diagrams Sequence and collaboration diagrams.
1 Object-Oriented Modeling Using UML (2) CS 3331 Fall 2009.
CS 160: Software Engineering September 10 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
1 CMPT 275 Phase: Design. Janice Regan, Map of design phase DESIGN HIGH LEVEL DESIGN Modularization User Interface Module Interfaces Data Persistance.
Understanding User Requirements. Documenting Use Cases 2 At this stage of the exploration, the participants should be thinking of essential use cases.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
5 Systems Analysis and Design in a Changing World, Fourth Edition.
Systems Analysis and Design in a Changing World, Fifth Edition
Use Cases 1. Last week  Introduction to software engineering  How is it different from traditional engineering?  Introduction to specification  Operational.
Key Takeaway Points A use case is a business process; it begins with an actor, ends with the actor, and accomplishes a business task for the actor. Use.
Requirements Artifacts Precursor to A & D. Objectives: Requirements Overview  Understand the basic Requirements concepts and how they affect Analysis.
Systems Analysis and Design in a Changing World, 3rd Edition
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 4: Restaurant.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Requirements Capture. Four Steps of requirements capture List candidate requirements Understand system context Capture functional requirements Capture.
Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 1 Rational Rose 2000 Class Diagrams.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
1 Use Case Diagrams Use Case Actor Use case description Use case realization (Scenario) Use case relationships –Extends –Uses.
1 Structuring Systems Requirements Use Case Description and Diagrams.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
Use Case Driven Analysis Requirements Use Case Use Case Description System Sequence Diagram Chapter 5.
Scenario A scenario is a sequence of steps describing an interaction between a user and a system. Use case is a set of scenarios tied together by a common.
Systems Analysis and Design in a Changing World, Fourth Edition
Reminder: Use case diagram for Scheduler. Example: top-down subsystem decomposition for Scheduler DayPlan – manages the list of tasks for the current.
Moving from “lots of Requirements” to “organized Product Design” Product Design ? User/Market/Business “Requirements” May be in various forms May also.
22 August, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 8 Use Case Diagrams.
Analysis Yaodong Bi. Introduction to Analysis Purposes of Analysis – Resolve issues related to interference, concurrency, and conflicts among use cases.
UML - Development Process 1 Software Development Process Using UML.
Use Case Diagrams. Introduction In the previous Lecture, you saw a brief review of the nine UML diagrams. Now that you have the clear, you'll start to.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
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.
5 Systems Analysis and Design in a Changing World, Fourth Edition.
Systems Analysis and Design in a Changing World, Fourth Edition
Appendix 3 Object-Oriented Analysis and Design
Activity and State Transition Diagram
Scenario 1: someone else hired you to build a system
UML Activity Diagrams.
Chapter 20 Object-Oriented Analysis and Design
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Use Case Analysis – continued
Appendix 3 Object-Oriented Analysis and Design
Design.
Presentation transcript:

Example: object diagram for Scheduler, v0.0.0

What is wrong with this diagram? Seems like a lot of similarity between Task and UnplannedTask Can use inheritance to reduce the clutter UnplannedTask is a special class of Task  …or is it the other way around? Make Task extend UnplannedTask

Example: object diagram for Scheduler, v0.0.1

What are we going to do with this CurrentTask object? Is it a different kind of object than Task and UnplannedTask?  No, any Task or UnplannedTask can play the role of CurrentTask  So, cannot use inheritance It seems to be in a relationship with TaskList  TaskList contains a CurrentTask

Cardinality of associations in object diagrams It is often useful to specify how many objects can participate in an association  E.g., a task list can contain any number of tasks, but a task can appear in only one task list Indicated by putting numbers and symbols on association edges TaskListTask 1 * Can be omitted

Example: object diagram for Scheduler, v0.0.2

Hmm, this reveals some problems… This diagram says that TaskList can contain only one task How to fix it?  Can add another aggregation association between TaskList and Task, or  Can change the inheritance hierarchy and introduce a task type that both Task and UnplannedTask inherit from  This is what we are going to do

Example: object diagram for Scheduler, v0.0.3

Example: object diagram for Scheduler, v0.0.5

Working in boundary and control objects An object diagram including only entity objects is nice because it  Gives a good intuitive idea of how the entities depend on each other  Doesn’t have to deal with objects that may be confusing to the users  Is less cluttered than diagrams including also boundary and control objects Introducing boundary objects into object diagrams helps with identifying which objects are accessed through which user interfaces in which ways Introducing control objects explicitly shows the way that control connects objects together

Example: object diagram for Scheduler, v0.0.12

Are Time and TimePeriod important enough to stay separate classes? Have an alternative for Time and TimePeriod  Leave them as separate classes  Represent important user-level concepts  Since they are only used by Task, consider them attributes of Task, not separate classes  Makes the diagram smaller and higher-level  Select this option

Example: object diagram for Scheduler, v0.0.13

Putting in control objects Do not have to do it  In many cases, clutter the diagram without adding much value May be helpful if the way in which they use entity and boundary objects is non-trivial

Example: object diagram for Scheduler, v0.0.15

Example: object diagram for Scheduler, v0.0.16

Showing dynamic interactions between objects using sequence diagrams Use cases are not precise about interactions  Say what needs to be done, but not  What objects are involved  Who is responsible Object diagrams show interactions, but not in terms of a specific use case  May be hard to define the role of an object in a specific use case if this object participates in many other use cases Sequence diagrams show a single use case (or even scenario) in terms of:  The sequence of actions and  The participating objects

Sequence diagram notation All participating objects and actors have vertical timelines Interactions between objects are shown as messages sent from one object to another Duration of an interaction from the point of view of an object is shown by a vertical box  “return” events may be shown Deletion of an object is shown with an “X” Object 1Object 2Object 3 message1 message2 message3

Example:sequence diagram for timing a task, Scheduler, v0.0.0

What is missing from this diagram? After the task has been timed, the elapsed time is changed for the Task object, but this does not mean that the UI interface object reflects this change  Need to send a message to the TaskBoundary object

Example:sequence diagram for timing a task, Scheduler, v0.0.1

This diagram does not satisfy the use case timeTask! This use case says: Preconditions: No task is being timed Normal flow: (1) The user makes the chosen task current in the list of all tasks (2) Use case startTimer is triggered (3) The display of the elapsed time of the current task is updated in real time (4) Use case stopTimer is triggered Postconditions: (1) No task is being timed (2) The elapsed time of the task that has been timed is incremented by the duration of the time interval between the start and the end of timing

This diagram does not satisfy the use case timeTask! This use case says: Preconditions: No task is being timed Normal flow: (1) The user makes the chosen task current in the list of all tasks (2) Use case startTimer is triggered (3) The display of the elapsed time of the current task is updated in real time (4) Use case stopTimer is triggered Postconditions: (1) No task is being timed (2) The elapsed time of the task that has been timed is incremented by the duration of the time interval between the start and the end of timing

Example:sequence diagram for timing a task, Scheduler, v0.0.2

Are there some relationships among objects that are missing from the object diagram? TimingControl object needs to get the current task from ActivatorControl object TimingControl object needs to access TaskBoundary object to update the view of the elapsed time The object diagram, v0.0.16, does not show these relationships

Example: object diagram for Scheduler, v0.0.17

Example:sequence diagram for changing date, Scheduler, v0.0.0

Let’s compare it against the chooseDate use case This use case says: Preconditions: no tasks are being created, notified, or timed Normal Flow: (1) The user modifies the field containing the date for which tasks are shown (2) The user activates the change Alternate Flow: If the date entered is not in the correct format, (1) An error dialog window appears, describing the error (2) The user acknowledges the error, which causes the error dialog to appear (3) The date is reset to the previous value Postconditions: (1) The list of tasks for the chosen date is displayed (2) If the chosen date is different from the previous date, the list of tasks for the previous date is not shown

Let’s compare it against the chooseDate use case This use case says: Preconditions: no tasks are being created, notified, or timed Normal Flow: (1) The user modifies the field containing the date for which tasks are shown (2) The user activates the change Alternate Flow: If the date entered is not in the correct format, (1) An error dialog window appears, describing the error (2) The user acknowledges the error, which causes the error dialog to appear (3) The date is reset to the previous value Postconditions: (1) The list of tasks for the chosen date is displayed (2) If the chosen date is different from the previous date, the list of tasks for the previous date is not shown

Who is right? The use case says that the user first changes the date and then confirms the change  Two explicit steps The sequence diagram says only that the user enters the new date  Implies one step There may be different ways to design the GUI for the date change  The use case is probably too specific  We will change the use case

New use case chooseDate, v0.1.0 Preconditions: no tasks are being created, notified, or timed Normal Flow: (1) The user requests the date change through the GUI Alternate Flow: If the date entered is not in the correct format, (1) An error dialog window appears, describing the error (2) The user acknowledges the error, which causes the error dialog to appear (3) The date is reset to the previous value Postconditions: (1) The list of tasks for the chosen date is displayed (2) If the chosen date is different from the previous date, the list of tasks for the previous date is not shown

Now this use case is incomplete! The user only requests the change, but there is nothing in this use case that says that the new date will be shown  Use case chooseDate, v0.1.1: Preconditions: no tasks are being created, notified, or timed Normal Flow: (1) The user requests the date change through the GUI Alternate Flow: If the date entered is not in the correct format, (1) An error dialog window appears, describing the error (2) The user acknowledges the error, which causes the error dialog to appear (3) The date is reset to the previous value Postconditions: (1) The list of tasks for the chosen date is displayed (2) If the chosen date is different from the previous date, the list of tasks for the previous date is not shown (3) The new date is displayed

Example:sequence diagram for changing date, Scheduler, v0.1.0=v0.0.0

The activity of displaying a new date is missing from this diagram Because of the change in the use case, DateChooser does not have to send the new date to ChooseDateControl in the string format ChooseDateControl object knows what the new date is, so it just has to send it to the object that displays it.  Which one?  To figure this out, let us look at the object diagram again

Example: object diagram for Scheduler, v0.1.0 = v0.0.17

A problem! Obviously, DateChooser boundary object should be made responsible for displaying the date But the object diagram does not show the relationship between ChooseDateControl and DateChooser that accomplishes that  We have to add this relationship

Example: object diagram for Scheduler, v0.1.1

Example:sequence diagram for changing date, Scheduler, v0.1.1

Modeling dynamic behavior of a single object with statechart diagrams Use case, object, and sequence diagrams do not specify what the conditions on the ability of an object to perform actions are  E.g., an object may be in a state where it cannot perform a certain service Statechart diagrams model an object’s behavior:  Show states of the object  Show transitions between the states, including  Guards --- conditions on when the transition can take place  Events --- what causes the transition  Side-effects --- events produced as a result of the transition

Example: statechart diagram for PlannedTask object of Scheduler, v0.1.0

Suggestions for improvement? Does a task enter a special state when it is timed?  Yes.

Example: statechart diagram for PlannedTask object of Scheduler, v0.1.1

Suggestions for improvement? Does a task enter a special state when it becomes current?  No, because a task can be timed and current at the same time  Also, completed and current, incomplete and current, etc. Still, there is a way to represent the task being in two states at the same time  The two states are hierarchically composed – one contains the other State 1 State 2

Example: statechart diagram for PlannedTask object of Scheduler, v0.1.2

Example: statechart diagram for PlannedTask object of Scheduler, v0.1.3

A big step: from analysis to design Analysis  Goals:  Understand the system to be built  Map out the general functionality  Reach agreement with users  The system is looked at from the users’ point of view Design  Goal:  Map the functionality of the analysis model onto concepts that can be implemented  The system is looked at from the developers’ point of view The transition from analysis to design is not trivial!

Design stages System (or high-level or architectural) design  Decomposes the system into parts that can be comfortably designed in separation  Designs interfaces for interactions between subsystems Object (or low-level) design  Designs objects for each subsystem

End products of system design A list of design goals  The specific non-functional qualities that the system must have  E.g. performance characteristics  Often deals with trade-offs, e.g. space for time Software architecture  Decomposition into subsystems  Including dependencies among them and control flow  Mapping of the system onto hardware  Access control  Data storage issues

System design issues Hardware/software mapping  What part of the system resides where Data management  Dealing with persistent data Access control  Security issues Control flow  The type of control flow in the system  Multithreading Boundary conditions  Handling of exceptional situations (on the system level)  Initialization and shutdown

Subsystems Why do we need them?  To reduce the complexity of the system --- divide-and-conquer  To enable concurrent development  Several groups working in parallel on different subsystems How many subsystems do I need?  Totally depends on the system

Two alternative ways of decomposing systems Top-down  Produce subsystems that logically map onto the general functionality (use case model) of the system  Fit the analysis classes into this model  Don’t need to fit in all of them Bottom-up  Analyze the object diagram and separate it into subsystems to limit the degree of coupling between subsystems and increase the degree of coherence within subsystems In reality, somewhere in between  And iterative…

Reminder: Use case diagram for Scheduler

Example: top-down subsystem decomposition for Scheduler DayPlan – manages the list of tasks for the current date PersistentStorage – persistently stores all tasks Editing – deals with modifying the list of tasks for the current date PerformanceView – computes and displays performance characteristics Timing – handles timing tasks