Software Development (Chapter 7) CSE 1020 Franck van Breugel - - PowerPoint PPT Presentation

software development chapter 7
SMART_READER_LITE
LIVE PREVIEW

Software Development (Chapter 7) CSE 1020 Franck van Breugel - - PowerPoint PPT Presentation

Software Development Software Development (Chapter 7) CSE 1020 Franck van Breugel November 3, 2009 Franck van Breugel CSE 1020 Software Development As we have already seen in Chapter 3, the process of software development consists of


slide-1
SLIDE 1

Software Development

Software Development (Chapter 7)

CSE 1020 Franck van Breugel November 3, 2009

Franck van Breugel CSE 1020

slide-2
SLIDE 2

Software Development

As we have already seen in Chapter 3, the process of software development consists of several phases including analysis design implementation testing maintenance

Franck van Breugel CSE 1020

slide-3
SLIDE 3

Software Development

Analyst

An analyst is responsible for trans- lating the requirements of the cus- tomer into a specification. Software Engineering Require- ments (CSE4312)

Stephen LeDrew

(political analyst) Franck van Breugel CSE 1020

slide-4
SLIDE 4

Software Development

Designer

A designer/architect is responsi- ble for developing a plan/algorithm to fulfill the specification. Fundamentals of Data Structures (CSE2011) and Design and Anal- ysis of Algorithms (CSE3101)

Karl Lagerfeld

(fashion designer) Franck van Breugel CSE 1020

slide-5
SLIDE 5

Software Development

Developer

A developer/implementer is re- sponsible for writing code that im- plements the algorithm. Introduction to Computer Science I and II (CSE1020 and CSE1030)

Donald Trump

(real estate developer) Franck van Breugel CSE 1020

slide-6
SLIDE 6

Software Development

Developer

databases Introduction to Databases (CSE3412) networks Computer Network Protocols and Applications (CSE3214) applications Introduction to Computer Science I and II (CSE1020 and CSE1030)

Franck van Breugel CSE 1020

slide-7
SLIDE 7

Software Development

Tester

A tester is responsible for check- ing whether the code satisfies the specification. Software Engineering Testing (CSE4313)

Jon Tester

(senator from Montana) Franck van Breugel CSE 1020

slide-8
SLIDE 8

Software Development

Team Composition

analysts 25% designers 10% developers 40% testers 25%

Franck van Breugel CSE 1020

slide-9
SLIDE 9

Software Development

How does the information flow?

Analysis

specifi cation

Design

algorithm

Implementation

code

Testing

Franck van Breugel CSE 1020

slide-10
SLIDE 10

Software Development

How does our team collaborate?

Analysis Design Implementation Testing In an ideal world, a phase only has impact on the ones immediately before and after it. However, . . .

Franck van Breugel CSE 1020

slide-11
SLIDE 11

Software Development

Testing may have impact on design

Analysis Design Implementation Testing

Winston W. Royce. Managing the development of large software

  • systems. In Proceedings of WESCON, pages 1–9, Los Angeles, CA,

USA, August 1970. IEEE.

Franck van Breugel CSE 1020

slide-12
SLIDE 12

Software Development

Waterfall model

Analysis Design Implementation Testing

Although the waterfall model is often attributed to Royce, neither the above diagram nor the term “waterfall model” can be found in his paper.

Franck van Breugel CSE 1020

slide-13
SLIDE 13

Software Development

Royce’s model

Analysis Design Implementation Testing Analysis Design Implementation Testing

Winston W. Royce. Managing the development of large software

  • systems. In Proceedings of WESCON, pages 1–9, Los Angeles, CA,

USA, August 1970. IEEE.

Franck van Breugel CSE 1020

slide-14
SLIDE 14

Software Development

Overview of development methodologies

waterfall model do it once risky Royce’s model do it twice less risky do it . . . even less risky

Franck van Breugel CSE 1020

slide-15
SLIDE 15

Software Development

Overview of development methodologies

waterfall model do it once risky Royce’s model do it twice less risky IID do it many times even less risky IID = iterative and incremental development

Franck van Breugel CSE 1020

slide-16
SLIDE 16

Software Development

Iterative and Incremental Development

Design Implementation Analysis Testing Evaluation

Franck van Breugel CSE 1020

slide-17
SLIDE 17

Software Development

Examples of IID projects

project: command and control system for submarine decade: 1970s iterations: four iterations of six months each

Craig Larman and Victor R. Basili. Iterative and incremental development: a brief history. IEEE Computer, 36(6):47–56, June 2003.

Franck van Breugel CSE 1020

slide-18
SLIDE 18

Software Development

Examples of IID projects

project: light airborne multipurpose system decade: 1970s iterations: 45 iterations of one month each

Craig Larman and Victor R. Basili. Iterative and incremental development: a brief history. IEEE Computer, 36(6):47–56, June 2003.

Franck van Breugel CSE 1020

slide-19
SLIDE 19

Software Development

Examples of IID projects

project: command and control system decade: 1980s iterations: six iterations of six month each

Craig Larman and Victor R. Basili. Iterative and incremental development: a brief history. IEEE Computer, 36(6):47–56, June 2003.

Franck van Breugel CSE 1020

slide-20
SLIDE 20

Software Development

Different IID methodologies

extreme programming (XP) Software Design (CSE3311) rational unified process (RUP) . . .

Franck van Breugel CSE 1020

slide-21
SLIDE 21

Software Development

Meet Our Customer

Our customer is visiting Brigus, Cupids, Gatineau, Hamilton, Mon- treal, Niagara on the lake, Ottawa, Petawawa, St. John’s, Toronto, Vancouver and Victoria. He would like an app that provides the cur- rent temperatures of those cities.

Franck van Breugel CSE 1020

slide-22
SLIDE 22

Software Development

Analysis

customer: Can you develop such an app for me? analyst: To limit our risks, we can start with an app that reads the web page

  • f the Weather Network that contains

the current temperature of Toronto and prints the HTML of that web page on the screen. customer: This better be cheap. analyst: How about a cup of coffee? customer: Deal.

Franck van Breugel CSE 1020

slide-23
SLIDE 23

Software Development

Analysis

customer: Can you develop such an app for me? analyst: To limit our risks, we can start with an app that reads the web page

  • f the Weather Network that contains

the current temperature of Toronto and prints the HTML of that web page on the screen. customer: This better be cheap. analyst: How about a cup of coffee? customer: Deal.

Franck van Breugel CSE 1020

slide-24
SLIDE 24

Software Development

Analysis

customer: Can you develop such an app for me? analyst: To limit our risks, we can start with an app that reads the web page

  • f the Weather Network that contains

the current temperature of Toronto and prints the HTML of that web page on the screen. customer: This better be cheap. analyst: How about a cup of coffee? customer: Deal.

Franck van Breugel CSE 1020

slide-25
SLIDE 25

Software Development

Analysis

customer: Can you develop such an app for me? analyst: To limit our risks, we can start with an app that reads the web page

  • f the Weather Network that contains

the current temperature of Toronto and prints the HTML of that web page on the screen. customer: This better be cheap. analyst: How about a cup of coffee? customer: Deal.

Franck van Breugel CSE 1020

slide-26
SLIDE 26

Software Development

Analysis

customer: Can you develop such an app for me? analyst: To limit our risks, we can start with an app that reads the web page

  • f the Weather Network that contains

the current temperature of Toronto and prints the HTML of that web page on the screen. customer: This better be cheap. analyst: How about a cup of coffee? customer: Deal.

Franck van Breugel CSE 1020

slide-27
SLIDE 27

Software Development

Design

designer: First, I want to determine which classes am I going to use. Which class do I usually use for reading (from the keyboard, from a file, etc)?

Franck van Breugel CSE 1020

slide-28
SLIDE 28

Software Development

Design

designer: First, I want to determine which classes am I going to use. Which class do I usually use for reading (from the keyboard, from a file, etc)? designer: The Scanner class.

Franck van Breugel CSE 1020

slide-29
SLIDE 29

Software Development

Design

designer: First, I want to determine which classes am I going to use. Which class do I usually use for reading (from the keyboard, from a file, etc)? designer: The Scanner class. designer: The web page of the Weather Network

  • f interest has a particular url. How can I find out

if there is a class to deal with url’s?

Franck van Breugel CSE 1020

slide-30
SLIDE 30

Software Development

Design

designer: First, I want to determine which classes am I going to use. Which class do I usually use for reading (from the keyboard, from a file, etc)? designer: The Scanner class. designer: The web page of the Weather Network

  • f interest has a particular url. How can I find out

if there is a class to deal with url’s? designer: Search the Java standard library.

Franck van Breugel CSE 1020

slide-31
SLIDE 31

Software Development

Design

designer: First, I want to determine which classes am I going to use. Which class do I usually use for reading (from the keyboard, from a file, etc)? designer: The Scanner class. designer: The web page of the Weather Network

  • f interest has a particular url. How can I find out

if there is a class to deal with url’s? designer: Search the Java standard library. designer: I have found the classes Scanner and URL. Which constructor do I use to create a Scanner that reads from a URL?

Franck van Breugel CSE 1020

slide-32
SLIDE 32

Software Development

Unifi ed Modeling Language (UML)

UML was designed by “the three amigos” Grady Booch, Ivar Jacobson and James Rumbaugh in the mid 1990s. UML provides a large variety of different types of diagrams. These diagrams can be used to model software.

Franck van Breugel CSE 1020

slide-33
SLIDE 33

Software Development

A Class Diagram

java::util::Scanner java::io::InputStream java::net::URL Scanner has-a InputStream (Chapter 8) URL uses InputStream

Franck van Breugel CSE 1020

slide-34
SLIDE 34

Software Development

A More Detailed Class Diagram

java::util::Scanner close() hasNextLine() : boolean nextLine() : String java::io::InputStream java::net::URL

  • penStream() :

InputStream

Franck van Breugel CSE 1020

slide-35
SLIDE 35

Software Development

Development

developer: You’re fired! designer: No Donald, you cannot fire

  • me. You have to implement my design.

developer: #!?%&*!

Franck van Breugel CSE 1020

slide-36
SLIDE 36

Software Development

Development

developer: You’re fired! designer: No Donald, you cannot fire

  • me. You have to implement my design.

developer: #!?%&*!

Franck van Breugel CSE 1020

slide-37
SLIDE 37

Software Development

Development

developer: You’re fired! designer: No Donald, you cannot fire

  • me. You have to implement my design.

developer: #!?%&*!

Franck van Breugel CSE 1020

slide-38
SLIDE 38

Software Development

Development

developer: You’re fired! designer: No Donald, you cannot fire

  • me. You have to implement my design.

developer: #!?%&*!

Franck van Breugel CSE 1020

slide-39
SLIDE 39

Software Development

Compile Time Error

Error message: unreported exception BlaBlaBlaException; must be caught or declared to be thrown Quick fix: add throws BlaBlaBlaException to the header of the main method Proper solution: will be discussed in Chapter 11 on exception handling

Franck van Breugel CSE 1020

slide-40
SLIDE 40

Software Development

Compile Time Error

Error message: unreported exception BlaBlaBlaException; must be caught or declared to be thrown Quick fix: add throws BlaBlaBlaException to the header of the main method Proper solution: will be discussed in Chapter 11 on exception handling

Franck van Breugel CSE 1020

slide-41
SLIDE 41

Software Development

Compile Time Error

Error message: unreported exception BlaBlaBlaException; must be caught or declared to be thrown Quick fix: add throws BlaBlaBlaException to the header of the main method Proper solution: will be discussed in Chapter 11 on exception handling

Franck van Breugel CSE 1020

slide-42
SLIDE 42

Software Development

Why only “throws IOException”?

java::io::IOException java::net::URL java::net::MalformedURLException MalformedURLException is a IOException (Chapter 9)

Franck van Breugel CSE 1020

slide-43
SLIDE 43

Software Development

Testing

Question: Should we test? Based on the software developer and user surveys, the national annual costs of an inadequate infrastructure for software testing is estimated to range from $22.2 to $59.5 billion. The Economic Impacts of Inadequate Infrastructure for Software Testing. Planning Report 02-3. May 2002. Answer: Yes!

Franck van Breugel CSE 1020

slide-44
SLIDE 44

Software Development

However ...

“Program testing can be used to show the presence of bugs, but never to show their absence!” Edsger W. Dijkstra. Notes on structured programming. Report 70-WSK-03, Technological University Eindhoven, April 1970.

Franck van Breugel CSE 1020

slide-45
SLIDE 45

Software Development

Edsger Wybe Dijkstra

Member of the Royal Netherlands Academy of Arts and Sciences (1971) Distinguished Fellow of the British Computer Society (1971) Recipient of the Turing Award (1972) Foreign Honorary Member of the American Academy of Arts and Sciences (1975)

Edsger Wybe Dijkstra

(1930–2002) Franck van Breugel CSE 1020

slide-46
SLIDE 46

Software Development

How to Test Code?

input

Code

  • utput

Franck van Breugel CSE 1020

slide-47
SLIDE 47

Software Development

White Box Testing

input public class . . .

  • utput

Franck van Breugel CSE 1020

slide-48
SLIDE 48

Software Development

Black Box Testing

input

Code

  • utput

Franck van Breugel CSE 1020