67
Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003

Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

  • Upload
    others

  • View
    30

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Software Lifecycle and Team Programming

Arun Chauhan

COMP 314

Lecture 2 January 21, 2003

Page 2: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Recap of the Last Lecture

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 3: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

BFS1 for each vertex v in V

2 color[v] = white

3 d[v] = INFINITY

4 p[v] = NULL

5 color[s] = gray

6 d[s] = 0

7 Queue.clear()

8 Queue.put(s)

9 while (!Queue.empty())

10 v = Queue.get()

11 for each u adjacent to v

12 if (color[u] == white)

13 color[u] = gray

14 d[u] = d[v] + 1

15 p[u] = v

16 Queue.put(u)

17 color[v] = black

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 4: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Lemmas

Lemma 1 : Let G = (V, E) be a graph, and s ∈ V a vertex. Then,

for any edge (u, v) ∈ E :

b(s, v) ≤ b(s, u) + 1

Lemma 2 : Upon termination, the BFS algorithm computes d[v] for

every vertex, and d[v] ≥ b(s, v).

Lemma 3 : At all times during the execution of BFS, the queue

contains vertices (v1, v2, . . . vr) such that

d[v1] ≤ d[v2] ≤ d[v3] . . . ≤ d[vr] AND d[vr] ≤ d[v1] + 1.

Corollary 4 : If vertices u and v are enqueued during execution of

BFS, and u is enqueued before v, then d[u] ≤ d[v].

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 5: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

LemmasLemma 1 : Let G = (V, E) be a graph, and s ∈ V a vertex. Then,

for any edge (u, v) ∈ E :

b(s, v) ≤ b(s, u) + 1

Lemma 2 : Upon termination, the BFS algorithm computes d[v] for

every vertex, and d[v] ≥ b(s, v).

Lemma 3 : At all times during the execution of BFS, the queue

contains vertices (v1, v2, . . . vr) such that

d[v1] ≤ d[v2] ≤ d[v3] . . . ≤ d[vr] AND d[vr] ≤ d[v1] + 1.

Corollary 4 : If vertices u and v are enqueued during execution of

BFS, and u is enqueued before v, then d[u] ≤ d[v].

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 6: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

LemmasLemma 1 : Let G = (V, E) be a graph, and s ∈ V a vertex. Then,

for any edge (u, v) ∈ E :

b(s, v) ≤ b(s, u) + 1

Lemma 2 : Upon termination, the BFS algorithm computes d[v] for

every vertex, and d[v] ≥ b(s, v).

Lemma 3 : At all times during the execution of BFS, the queue

contains vertices (v1, v2, . . . vr) such that

d[v1] ≤ d[v2] ≤ d[v3] . . . ≤ d[vr] AND d[vr] ≤ d[v1] + 1.

Corollary 4 : If vertices u and v are enqueued during execution of

BFS, and u is enqueued before v, then d[u] ≤ d[v].

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 7: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

LemmasLemma 1 : Let G = (V, E) be a graph, and s ∈ V a vertex. Then,

for any edge (u, v) ∈ E :

b(s, v) ≤ b(s, u) + 1

Lemma 2 : Upon termination, the BFS algorithm computes d[v] for

every vertex, and d[v] ≥ b(s, v).

Lemma 3 : At all times during the execution of BFS, the queue

contains vertices (v1, v2, . . . vr) such that

d[v1] ≤ d[v2] ≤ d[v3] . . . ≤ d[vr] AND d[vr] ≤ d[v1] + 1.

Corollary 4 : If vertices u and v are enqueued during execution of

BFS, and u is enqueued before v, then d[u] ≤ d[v].

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 8: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

LemmasLemma 1 : Let G = (V, E) be a graph, and s ∈ V a vertex. Then,

for any edge (u, v) ∈ E :

b(s, v) ≤ b(s, u) + 1

Lemma 2 : Upon termination, the BFS algorithm computes d[v] for

every vertex, and d[v] ≥ b(s, v).

Lemma 3 : At all times during the execution of BFS, the queue

contains vertices (v1, v2, . . . vr) such that

d[v1] ≤ d[v2] ≤ d[v3] . . . ≤ d[vr] AND d[vr] ≤ d[v1] + 1.

Corollary 4 : If vertices u and v are enqueued during execution of

BFS, and u is enqueued before v, then d[u] ≤ d[v].

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 9: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Theorem

Theorem: Given G = (V, E) and source vertex s, the BFS

algorithm discovers every vertex v reachable from s, and upon

termination, d[v] = b(s, v). Moreover, for any vertex v reachable

from s, one of the shortest paths from s to v is a path from s to

p[v], followed by edge (p[v], v).

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 10: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Lecture 2

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 11: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

What this Lecture is About

• applied aspects of data-structures and algorithms

• “software engineering”

- issues in developing large software

- techniques for managing software development

• software lifecycle

• project management

• extreme programming

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 12: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

State of the SoftwareIf software were an office building, it would be built by a thousand carpenters,

electricians and plumbers. Without architects. Or blueprints. It would look

spectacular, but inside, the elevators would fail regularly. Thieves would have

unfettered access through open vents at street level. Tenants would need consultants

to move in. They would discover that the doors unlock whenever someone brews a

pot of coffee. The builders would provide a repair kit and promise that such

idiosyncrasies would not exist in the next skyscraper they build (which, by the way,

tenants will be forced to move into).

Strangely, the tenants would be OK with all this. They’d tolerate the costs and the

oddly comforting rhythm of failure and repair that came to dominate their lives. If

someone asked, “Why do we put up with this building?” shoulders would be shrugged,

hands tossed and sighs heaved. “That’s just how it is. Basically, buildings suck.”

from an online article on idg.net

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 13: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Does Software Really Suck?

• slight exaggeration, but not far from the fact

• examples of software failures abound

• but, sofware companies still expect to make money!

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 14: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Software Failures

Year 1900 Bug

In 1992, Mary from Winona, Minnesota, received an in-

vitation to attend a kindergarten. Mary was 104 at that

time.

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 15: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Software Failures

Interface Misuse

On April 10, 1990, in London, an underground train left

the station without its driver. The driver had taped the

button that started the train, relying on the system that

prevented the train from moving when doors were open.

The train operator had left his train to close a door which

was stuck. When the door was finally shut, the train

simply left.

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 16: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Software Failures

Late and Over Budget

In 1995, bugs in the automated luggage system of the

new Denver International Airport caused suitcases to be

chewed up. The airport opened 16 months late, $3.2

billion over-budget, with mostly manual luggage system.

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 17: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Software Failures

On-Time Delivery

After 18 months of development, a $200 million system

was delivered to a health insurance company in Wiscon-

sin in 1984. However, the system did not work correctly;

$60 million in overpayments were issued. The system

took 3 years to fix.

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 18: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Software Failures

Unnecessary Complexity

The C-17 cargo plane by McDonnel Douglas ran $500

million over budget because of problems with its avionics

software. The C-17 included 19 onboard computers, 80

microprocessors, and 6 different programming languages.

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 19: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Lessons

• we rely more and more on software in our daily lives

• software mistakes are costly

• software reliability is critical

• software usability is very important

• software projects are mostly ill-managed

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 20: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Why Software Engineering?

• software engineering coined in the late 1960s because:Software developers were not able to set concrete objec-

tives, predict the resources necessary to attain those ob-

jectives, and manage the customers’ expectations. More

often than not, the moon was promised, a lunar rover

built, and a pair of square wheels delivered.

• Arguably, large pieces of software are the most

complicated entities ever created by humans!

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 21: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Why Software Engineering?

• software engineering coined in the late 1960s because:Software developers were not able to set concrete objec-

tives, predict the resources necessary to attain those ob-

jectives, and manage the customers’ expectations. More

often than not, the moon was promised, a lunar rover

built, and a pair of square wheels delivered.

• Arguably, large pieces of software are the most

complicated entities ever created by humans!

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 22: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

What is Engineering?

• well established engineering disciplines are

applications of natural sciences

• engineering is a quick way to design objects

- civil engineers have widely used “handbooks” to guide

construction

• engineering is a collection of best practices

• engineering is a collection of design patterns

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 23: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Activities in a Large Project

• modeling

• problem solving

• knowledge acquisition

• rationale management

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 24: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Activities in a Large Project

• modeling

• problem solving

• knowledge acquisition

• rationale management

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 25: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Activities in a Large Project

• modeling

• problem solving

• knowledge acquisition

• rationale management

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 26: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Activities in a Large Project

• modeling

• problem solving

• knowledge acquisition

• rationale management

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 27: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Activities in a Large Project

• modeling

• problem solving

• knowledge acquisition

• rationale management

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 28: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Modeling with UML

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 29: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Modeling With UML

• functional model

- UML use case models

- functionality of the system from user’s point of view

• object model

- UML class diagrams

- structure of a system in terms of objects, attributes,

associations, and operations

• dynamic model

- UML sequence diagrams, statechart diagrams, activity

diagrams

- internal behavior of the system

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 30: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Use Case Diagrams

ReadTime

SetTime

ChangeBattery

SimpleWatch

WatchRepairPersonWatchUser

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 31: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Use Case Diagrams: Generalization

Authenticate

AuthenticateWithPassword

Authenticate

WithCard

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 32: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Use Case Diagrams: Include

DepressClutch

<<include>>

<<include>>

ChangeGearToReverse

ChangeGearToFirst

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 33: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Use Case Diagrams: Extend

EngineStalled

<<extend>>

ChangeGearToReverse

ChangeGearToFirst

<<extend>>

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 34: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Class Diagrams

Battery

SimpleWatch

1 1 1

2 1 2 1

1

PushButton Display Time

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 35: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Class Diagrams: Aggregation

State

PoliceStation PoliceOfficer

County Township

FileDirectory

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 36: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Class Diagrams: Inheritance

Watch

CalculatorWatch

calculatorState

EnterCalcMode()InputNumber(n)

SetDate(d)

datetime

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 37: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Class Diagrams: Instances

cW15:CalculatorWatch

<<instanceOf>>

<<instanceOf>>

Watch

CalculatorWatch

sW1291:Watch

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 38: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Sequence Diagrams

:WatchUser

:SimpleWatch :Time :TimeZone

pressButton2() getTime()

GMTTime()

GMTTime()

getTimeDelta()

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 39: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

State Chart Diagrams

BlinkHoursIncrementHours

IncrementMinutes

IncrementSeconds

button1&2pressed

button1&2pressed

button2pressed

button2pressed

button2pressed

button1pressed

button1pressed

StopBlinking BlinkSeconds

BlinkMinutes

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 40: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Software Life Cycle

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 41: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Software Development: Simple View

Administrator End UserClient

<<include>> <<include>>Software development

Problem definition System development System operation

Project Manager Developer

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 42: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Simple Activity Centric View

definitionactivity

Systemdevelopmentactivity

Systemoperationactivity

Problem

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 43: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Simple Entity Centric View

System specification

Software Development

document

documentExecutable system

documentLessons learned

Market survey

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 44: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Software Life Cycle: IEEE 1074Software life cycle

Process group

PhaseWork Product

Task

Resource

Participant

Time

Money

*

*

*

**

*

consumesproduces

Process

Activity

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 45: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Waterfall Model

Process

Project

Exploration

Allocation

DesignProcess

Validation

installationProcesss

Operation &

InitiationProcess

Concept

Process

System

Process

RequirementsProcess

ProcessImplementation

Verification &

Processs

Support

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 46: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

V-Model

OperationRequirement

Software

PreliminaryDesign

DetailedDesign

System

Analysis

System

ElicitationRequirements

AnalysisRequirements

Implementation

TestUnit

& Test

ComponentIntegration

& TestIntegration

AcceptanceClient

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 47: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Other Models

• Boehm’s Spiral Model

• Sawtooth Model

• Shark Tooth Model

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 48: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Design Patterns in UML

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 49: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Design Patterns

Composite

*

leavesLeaf

Component

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 50: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Design Patterns

Compiler

Optimizer

create() generateParseTree()

Parser

compile(s)

CodeGenerator

create()

ParseTree

create()

Compiler

getToken()

Lexer

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 51: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Extreme Programming

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 52: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Extreme Programming

• relatively new idea—barely 6 years old

• suited to small projects, of 2-30 people

• relaxes the heavyweight management in favor of

informality

• software development process divided into four types

of activities

- planning

- designing

- coding

- testing

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 53: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

XP: Coding (simplified)

• customer is always available

• code formatted to standards

- design patterns

- best practices

• unit test coded first

- unit tests also serve as documentation

• pair programming

- counter-intuitive, but works!

• collective code ownership

• optimize last

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 54: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

XP: Coding (simplified)• customer is always available

• code formatted to standards

- design patterns

- best practices

• unit test coded first

- unit tests also serve as documentation

• pair programming

- counter-intuitive, but works!

• collective code ownership

• optimize last

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 55: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

XP: Coding (simplified)• customer is always available

• code formatted to standards

- design patterns

- best practices

• unit test coded first

- unit tests also serve as documentation

• pair programming

- counter-intuitive, but works!

• collective code ownership

• optimize last

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 56: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

XP: Coding (simplified)• customer is always available

• code formatted to standards

- design patterns

- best practices

• unit test coded first

- unit tests also serve as documentation

• pair programming

- counter-intuitive, but works!

• collective code ownership

• optimize last

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 57: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

XP: Coding (simplified)• customer is always available

• code formatted to standards

- design patterns

- best practices

• unit test coded first

- unit tests also serve as documentation

• pair programming

- counter-intuitive, but works!

• collective code ownership

• optimize last

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 58: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

XP: Coding (simplified)• customer is always available

• code formatted to standards

- design patterns

- best practices

• unit test coded first

- unit tests also serve as documentation

• pair programming

- counter-intuitive, but works!

• collective code ownership

• optimize last

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 59: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

XP: Coding (simplified)• customer is always available

• code formatted to standards

- design patterns

- best practices

• unit test coded first

- unit tests also serve as documentation

• pair programming

- counter-intuitive, but works!

• collective code ownership

• optimize last

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 60: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Tools

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 61: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Modern Tools

• project tools

• CASE tools

• project management tools

- PERT charts (Program Evaluation Review Technique), also

called PERT / CRM (Critical Path Management)

- Gantt charts

- project management software

• high-level languages

• program development environments

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 62: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Modern Tools

• project tools

• CASE tools

• project management tools

- PERT charts (Program Evaluation Review Technique), also

called PERT / CRM (Critical Path Management)

- Gantt charts

- project management software

• high-level languages

• program development environments

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 63: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Modern Tools

• project tools

• CASE tools

• project management tools

- PERT charts (Program Evaluation Review Technique), also

called PERT / CRM (Critical Path Management)

- Gantt charts

- project management software

• high-level languages

• program development environments

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 64: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Modern Tools

• project tools

• CASE tools

• project management tools

- PERT charts (Program Evaluation Review Technique), also

called PERT / CRM (Critical Path Management)

- Gantt charts

- project management software

• high-level languages

• program development environments

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 65: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Modern Tools

• project tools

• CASE tools

• project management tools

- PERT charts (Program Evaluation Review Technique), also

called PERT / CRM (Critical Path Management)

- Gantt charts

- project management software

• high-level languages

• program development environments

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 66: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Modern Tools

• project tools

• CASE tools

• project management tools

- PERT charts (Program Evaluation Review Technique), also

called PERT / CRM (Critical Path Management)

- Gantt charts

- project management software

• high-level languages

• program development environments

Lecture 2: Software Lifecycle and Team Programming January 21, 2003

Page 67: Software Lifecycle and Team Programming€¦ · Software Lifecycle and Team Programming Arun Chauhan COMP 314 Lecture 2 January 21, 2003. RecapoftheLastLecture Lecture 2: Software

Next Lecture: Back to Graphs

Lecture 2: Software Lifecycle and Team Programming January 21, 2003