HFOOAD Chapter 2 Requirements. We create software for a reason. We create software fro people. We need to know what the people want in the software we.

Slides:



Advertisements
Similar presentations
Int 2 Computing Software Development.
Advertisements

© 2010 Bennett, McRobb and Farmer1 Use Case Description Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
1 Software Engineering Lecture 11 Software Testing.
ISBN Chapter 3 Describing Syntax and Semantics.
1 CS 106, Winter 2009 Class 4, Section 4 Slides by: Dr. Cynthia A. Brown, Instructor section 4: Dr. Herbert G. Mayer,
WEEK 4 Material Lecture 4a (Wed.). Use Cases/Actors o What is a use case ? l A sequence of actions performed by a system that yields an observable result.
Use cases and requirement specification - 1 Use case diagrams 3 use cases System boundaries Remember: Use case diagramming is a tool, not the requirements.
Functional Requirements – Use Cases Sriram Mohan/Steve Chenoweth (Chapters 14, 21 – Requirements Text) 1.
Requirements
1 Intro to Finite Automata Chapter 2 introduces the concept of a Finite Automata (or FA). An FA has several properties: It is theoretical. It allows computer.
Concurrency Java Threads. Fundamentals Concurrency defines parallel activity Synchronization is necessary in order for parallel activities to share results.
Describing Syntax and Semantics
Functional Requirements – Use Cases Steve Chenoweth & Chandan Rupakheti (Chapters 14, 21 – Requirements Text)  Quiz question 9 relates to this, when you’ve.
Adding the Detail Filling in Use Case Templates. Use Case Template The use case diagram is important for visualizing a system and as a communication tool.
Types of Essays... and why we write them.. Why do we write essays? Hint: The answer is NOT ‘because sir/miss told me to’
What do you think it means… if I told you that learning about idioms is a piece of cake? But, how did you know what a piece of cake means? You’re right!
UML for Java Programmers Object Mentor, Inc. Copyright  by Object Mentor, Inc All Rights Reserved
Software Engineering 2003 Jyrki Nummenmaa 1 USE CASES In this lecture: Use cases - What are use cases? - Why to use use cases? - How to write.
Use Cases Why use ‘em? How do they work? UC diagrams Using them later in the software development cycle.
Use Case What is it?. Basic Definition Of who can do what within a system? TemplateDiagramModelDescription.
Software Engineering – University of Tampere, CS DepartmentJyrki Nummenmaa USE CASES In this lecture: Use cases - What are use.
Chapter 3 Use Cases.
© 2005 course technology1 1 University Of Palestine UML for The IT Business Analyst A practical guide to Object Oriented Requirement Gathering Hoard Podeswa.
1 UML for The IT Business Analyst A practical guide to Object Oriented Requirement Gathering Hoard Podeswa Instructor: Mrs. Eman ElAjrami 2008 University.
More on “The Huddersfield Method” A lightweight, pattern-driven method based on SSM, Domain Driven Design and Naked Objects.
10/12/ Recall The Team Skills 1. Analyzing the Problem (with 5 steps) 2. Understanding User and Stakeholder Needs 1. Interviews & questionnaires.
Systems Analysis and Design in a Changing World, 6th Edition
Chapter 6 Use Cases. Use Cases: –Text stories Some “actor” using system to achieve a goal –Used to discover and record requirements –Serve as input to.
Errors And How to Handle Them. GIGO There is a saying in computer science: “Garbage in, garbage out.” Is this true, or is it just an excuse for bad programming?
Object Oriented Analysis and Design Chapter 4: Analysis.
Requirements Analysis via Use Cases SE-2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
Week 1 - Friday.  What did we talk about last time?  Our first Java program.
CS12420 Sequence Diagrams – a UML notation for modelling bahaviour Lynda Thomas Images from Wikipedia unless credited or mine.
1 UML Basic Training. UML Basic training2 Agenda  Definitions: requirements, design  Basics of Unified Modeling Language 1.4  SysML.
2. GATHERING REQUIREMENTS Object-Oriented Analysis and Design NTPCUG.
Lecture 3 Uses Cases Topics UML Use Cases pop quiz Readings: Chapter 3 January 24, 2008 CSCE 492 Software Engineering.
Digital Logic Design Lecture # 21 University of Tehran.
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 1: Introduction to Use-Case Modeling.
A Use Case Primer 1. The Benefits of Use Cases  Compared to traditional methods, use cases are easy to write and to read.  Use cases force the developers.
Requirements Change! Chapter 3 Object-Oriented Analysis and Design Tom Perkins.
HFOOAD Chapter 3 Change: the constant in software development.
1 Design and Integration: Part 2. 2 Plus Delta Feedback Reading and lecture repeat Ambiguous questions on quizzes Attendance quizzes Boring white lecture.
1 Version /05/2004 © 2004 Robert Oshana Requirements Engineering Use cases.
1 Chapter 5 Modeling System Requirements Finding the Use Cases Page
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 5 INTRODUCTION TO SYSTEMS ANALYSIS AND DESIGN: AN AGILE, ITERATIVE APPROACH CHAPTER.
Use Cases CS 6961 – Lecture 4 Nathan Dykman. Neumont UniversityCS Lecture 102 Administration Homework 1 is due –Still reviewing the proposal, but.
Goal: We will use the “R” strategy to help make a personal connection to text.
Requirements specification Why is this the first major stage of software development? –Need to understand what customer wants first Goal of requirements.
CS 151: Object-Oriented Design August 29 Class Meeting Department of Computer Science San Jose State University Spring 2012 Instructor: Ron Mak
ANU COMP2110 Software Design in 2003 Lecture 10Slide 1 COMP2110 Software Design in 2004 Lecture 12 Documenting Detailed Design How to write down detailed.
1 What is the Software Life Cycle? The stages of developing a software application Requirements Analysis High-level Design Plan Low-level Design Implementation.
Elevator Example.
BIT 115: Introduction To Programming Professor: Dr. Baba Kofi Weusijana (say Doc-tor Way-oo-see-jah-nah, Doc-tor, or Bah-bah)
1 Flow of Control Chapter 5. 2 Objectives You will be able to: Use the Java "if" statement to control flow of control within your program.  Use the Java.
Team Skill 3 - Defining the System (Chapters of the requirements text ) Sriram Mohan 1.
Requirements. Outline Definition Requirements Process Requirements Documentation Next Steps 1.
1. In an activity diagrams, a Boolean test which shows how flow betweenactivities occur and represents in [], is called: pre-condition post-condition an.
George Wang, Ph.D. COMP 380/L Lesson 2. Use Case Use cases are a way to capture system functionalities (i.e., functional requirements) Based on use case.
Comp1004: Introduction III Java. Content How Java Works: The JVM Writing a Class in Java – Class – Member Variables – Method – Statement Magic incantations.
Pepper modifying Sommerville's Book slides
Requirements Spec Revisited
CMPE 280 Web UI Design and Development August 29 Class Meeting
BIM Gatherıng Requırements Give Them What They Want
Recall The Team Skills Analyzing the Problem (with 5 steps)
Requirements: Use Case Models and Narratives
The Object-Oriented Thought Process Chapter 06
Software Design Lecture : 15.
Use Case Modeling.
Applying Use Cases (Chapters 25,26)
HFOOAD Chapter 5 Interlude
Presentation transcript:

HFOOAD Chapter 2 Requirements

We create software for a reason. We create software fro people. We need to know what the people want in the software we build. These are called REQUIREMENTS. 2

Who provides requirements?

We call these people Stakeholders Customer End user Development team members Management Technology providers

This chapter’s application 5 Doug + Dog + Door = Great Idea

Your job should you choose to accept 6 Todd and Gina said they want a door installed with a remote button so they can open the door from their bedroom when their dog Fido wakes them up in the middle of the night.

The initial product 7 This is a piece of cake, right? And you’re getting paid for this!

Our requirements ‣ Push the button on the remote and open the door ‣ Push the button again to close the door 8 This is all we have to do. It’s just what Doug said the system needs to do. It seems like there should be more. Are you really sure this is all we need to do? I think we should do a little design before we implement it.

DogDoorRemote 9 ‣ Open ‣ Close ‣ Wait for signal from the remote Our requirements − two classes ‣ Tell the door to open or close ‣ Recognize when the button is pushed

10 public class DogDoor { private boolean open; public DogDoor() { this.open = false; } public void open() { System.out.println("The dog door opens."); open = true; } public void close() { System.out.println("The dog door closes."); open = false; } public boolean isOpen() { return open; } public class Remote { private DogDoor door; public Remote(DogDoor door) { this.door = door; } public void pressButton() { System.out.println("Pressing the remote control button..."); if (door.isOpen()) { door.close(); } else { door.open(); }

A word from the QA department… 11 Are you sure it works? Where are your tests?

Test program from the book 12 public class DogDoorSimulator { public static void main(String[] args) { DogDoor door = new DogDoor(); Remote remote = new Remote(door); System.out.println("Fido barks to go outside..."); remote.pressButton(); System.out.println("\nFido has gone outside..."); remote.pressButton(); System.out.println("\nFido's all done..."); remote.pressButton(); System.out.println("\nFido's back inside..."); remote.pressButton(); } Are these good tests? Why or why not?

The customer is the final judge 13

Let’s back up a bit ‣ We did exactly what Doug told us to do ‣ We tested it ‣ The door worked as we programmed it ‣ The hardware works ‣ The software works 14 So, what’s did we do wrong?

What is a requirement? 15 ‣ A requirement is a feature that your system must have in order to satisfy the customer. ‣ A requirement is something your system must do. Did we meet the requirements?

Define the problem ‣ Talk to the customer ‣ Talk to other stakeholders ‣ Ask questions ‣ Brainstorm ‣ Look at the problem from many points of view 16

17 We don’t want to have to get out of bed in the middle of the night. We want a door that we can open remotely and that will close after the dog goes out I want Fluffy to go out whenever she wants without needing me to go to the door. But, I don’t want the door to open unless I allow it. I just need to go out!

What we currently know ‣ Doug ‣ We need a system soon ‣ It has to be cost-effective ‣ Hardware engineers ‣ The door has two signals ‣ Get the current state (open or closed) ‣ Change the door’s state (open-to-closed or closed-to-open) ‣ The remote sends a single signal (button pressed) ‣ Customers’ stated requirements ‣ Door should be able to be opened remotely ‣ Door should close after dog goes out ‣ Customers’ implied requirements ‣ Door should not close while the dog going through it ‣ Door should close automatically and not by remote 18

Requirements from the book 19

A scenario of how the system works 20

Do we need a diagram? 21

Fido doesn’t go outside, but stays in Fido doesn’t come back inside The door starts to close when Fido is going out … Other scenarios 22

Welcome to use cases ‣ A use case is ‣ A complete sequence of steps that provides value to someone ‣ Something your system must do ‣ Initiated by an Actor (someone or something not part of your system) 23

24 ‣ Provide value ‣ Are complete ‣ Are initiated by an actor ‣ Describe a single goal of the system ‣ Be described by UML diagrams with text ‣ Be formally structured ‣ Be described using a language with formal semantics ‣ Be described by using software tools Use cases definitely… Use cases may… The essence of use cases

Use Case ≠ Scenario 25 A scenario is one way to achieve the goal from a specific starting point. A use case describes all ways to achieve the goal from a specific starting point.

Parts of a use case 26 Name: Usually verb-noun (e.g. enroll in course) Description: A paragraph or two describing the purpose and value (results) Actors: Name the actor(s) involved Basic Flow: The most common or expected path through the use case Alternate Flows: Those paths or exceptions that can occur Preconditions: Things that must be true before the use case can begin Postconditions: Things that must be true when the use case ends successfully

How formal do you need to be? 27 If it works, use it!

Dog door system V2 28 import java.util.Timer; import java.util.TimerTask; public class Remote { private DogDoor door; public Remote(DogDoor door) { this.door = door; } public void pressButton() { System.out.println("Pressing the remote control button..."); if (door.isOpen()) { door.close(); } else { door.open(); final Timer timer = new Timer(); timer.schedule(new TimerTask() { public void run() { door.close(); timer.cancel(); } }, 5000); } The responsibility karma is out of balance.

29 DogDoorRemote Our requirements − two classes ‣ Tell the door to open or close ‣ Recognize when the button is pushed ‣ Open ‣ Close ‣ Wait for signal from the remote ‣ Close the door after 5 seconds

Time to refactor 30 Fix the code!

Looking ahead 31

Possible features for V