Designing Software Designing Software Algorithm definition Designing Software

  • Slides: 98
Download presentation
Designing Software

Designing Software

Designing Software • Algorithm definition

Designing Software • Algorithm definition

Designing Software • Algorithm definition – A set of well-defined instructions for carrying out

Designing Software • Algorithm definition – A set of well-defined instructions for carrying out a particular task.

Designing Software • Algorithm definition – A set of well-defined instructions for carrying out

Designing Software • Algorithm definition – A set of well-defined instructions for carrying out a particular task. – Characteristics of a good algorithm :

Designing Software • Algorithm definition – A set of well-defined instructions for carrying out

Designing Software • Algorithm definition – A set of well-defined instructions for carrying out a particular task. – Characteristics of a good algorithm : • Predictable

Designing Software • Algorithm definition – A set of well-defined instructions for carrying out

Designing Software • Algorithm definition – A set of well-defined instructions for carrying out a particular task. – Characteristics of a good algorithm : • Predictable – you know what it is supposed to do

Designing Software • Algorithm definition – A set of well-defined instructions for carrying out

Designing Software • Algorithm definition – A set of well-defined instructions for carrying out a particular task. – Characteristics of a good algorithm : • Predictable – you know what it is supposed to do • Deterministic

Designing Software • Algorithm definition – A set of well-defined instructions for carrying out

Designing Software • Algorithm definition – A set of well-defined instructions for carrying out a particular task. – Characteristics of a good algorithm : • Predictable – you know what it is supposed to do • Deterministic – it always does the same thing

Designing Software • Algorithm definition – A set of well-defined instructions for carrying out

Designing Software • Algorithm definition – A set of well-defined instructions for carrying out a particular task. – Characteristics of a good algorithm : • Predictable – you know what it is supposed to do • Deterministic – it always does the same thing • Not subject to chance

Designing Software • Algorithm definition – A set of well-defined instructions for carrying out

Designing Software • Algorithm definition – A set of well-defined instructions for carrying out a particular task. – Characteristics of a good algorithm : • Predictable – you know what it is supposed to do • Deterministic – it always does the same thing • Not subject to chance – tells you everything you need to know to do the task

Designing Software • Recipe analogy

Designing Software • Recipe analogy

Designing Software • Recipe analogy – Predictable

Designing Software • Recipe analogy – Predictable

Designing Software • Recipe analogy – Predictable – Deterministic

Designing Software • Recipe analogy – Predictable – Deterministic

Designing Software • Recipe analogy – Predictable – Deterministic – Not subject to chance

Designing Software • Recipe analogy – Predictable – Deterministic – Not subject to chance

Designing Software • Recipe analogy – Predictable … you know what the recipe makes

Designing Software • Recipe analogy – Predictable … you know what the recipe makes – Deterministic – Not subject to chance

Designing Software • Recipe analogy – Predictable … you know what the recipe makes

Designing Software • Recipe analogy – Predictable … you know what the recipe makes – Deterministic … if you follow directions, comes out the same every time – Not subject to chance

Designing Software • Recipe analogy – Predictable … you know what the recipe makes

Designing Software • Recipe analogy – Predictable … you know what the recipe makes – Deterministic … if you follow directions, comes out the same every time – Not subject to chance … provides you:

Designing Software • Recipe analogy – Predictable … you know what the recipe makes

Designing Software • Recipe analogy – Predictable … you know what the recipe makes – Deterministic … if you follow directions, comes out the same every time – Not subject to chance … provides you: • All the ingredients

Designing Software • Recipe analogy – Predictable … you know what the recipe makes

Designing Software • Recipe analogy – Predictable … you know what the recipe makes – Deterministic … if you follow directions, comes out the same every time – Not subject to chance … provides you: • All the ingredients • Measurements

Designing Software • Recipe analogy – Predictable … you know what the recipe makes

Designing Software • Recipe analogy – Predictable … you know what the recipe makes – Deterministic … if you follow directions, comes out the same every time – Not subject to chance … provides you: • All the ingredients • Measurements • Every step and the order to do them in

Designing Software • Recipe analogy – Predictable … you know what the recipe makes

Designing Software • Recipe analogy – Predictable … you know what the recipe makes – Deterministic … if you follow directions, comes out the same every time – Not subject to chance … provides you: • • All the ingredients Measurements Every step and the order to do them in Cook times

Designing Software • Recipe analogy – Predictable … you know what the recipe makes

Designing Software • Recipe analogy – Predictable … you know what the recipe makes – Deterministic … if you follow directions, comes out the same every time – Not subject to chance … provides you: • • • All the ingredients Measurements Every step and the order to do them in Cook times …everything you need to do it

Designing Software • Can you think of any examples of “algorithms” in your daily

Designing Software • Can you think of any examples of “algorithms” in your daily life?

Designing Software • Can you think of any examples of “algorithms” in your daily

Designing Software • Can you think of any examples of “algorithms” in your daily life? – A set of well-defined instructions for carrying out a particular task.

A Tougher Algorithm

A Tougher Algorithm

A Tougher Algorithm • Your mom just dumped your clean laundry on your bedroom

A Tougher Algorithm • Your mom just dumped your clean laundry on your bedroom floor. . .

A Tougher Algorithm • Your mom just dumped your clean laundry on your bedroom

A Tougher Algorithm • Your mom just dumped your clean laundry on your bedroom floor. . . • Create an algorithm for putting your clothes away in the closet & dresser.

A Tougher Algorithm • Your mom just dumped your clean laundry on your bedroom

A Tougher Algorithm • Your mom just dumped your clean laundry on your bedroom floor. . . • Create an algorithm for putting your clothes away in the closet & dresser. – Identify what is needed to accomplish the task

A Tougher Algorithm • Your mom just dumped your clean laundry on your bedroom

A Tougher Algorithm • Your mom just dumped your clean laundry on your bedroom floor. . . • Create an algorithm for putting your clothes away in the closet & dresser. – Identify what is needed to accomplish the task – All steps

A Tougher Algorithm • Your mom just dumped your clean laundry on your bedroom

A Tougher Algorithm • Your mom just dumped your clean laundry on your bedroom floor. . . • Create an algorithm for putting your clothes away in the closet & dresser. – Identify what is needed to accomplish the task – All steps – Decisions that need to be made

A Tougher Algorithm • Your mom just dumped your clean laundry on your bedroom

A Tougher Algorithm • Your mom just dumped your clean laundry on your bedroom floor. . . • Create an algorithm for putting your clothes away in the closet & dresser. – Identify what is needed to accomplish the task – All steps – Decisions that need to be made – Think about what could go wrong

A Tougher Algorithm • Your mom just dumped your clean laundry on your bedroom

A Tougher Algorithm • Your mom just dumped your clean laundry on your bedroom floor. . . • Create an algorithm for putting your clothes away in the closet & dresser. – Identify what is needed to accomplish the task – All steps – Decisions that need to be made – Think about what could go wrong – Be ready to share it with the class

A Tougher Algorithm • Your mom just dumped your clean laundry on your bedroom

A Tougher Algorithm • Your mom just dumped your clean laundry on your bedroom floor. . . • Create an algorithm for putting your clothes away in the closet & dresser. – Identify what is needed to accomplish the task – All steps – Decisions that need to be made – Think about what could go wrong – Be ready to share it with the class … you have about 20 minutes

My Take On Picking Up The Clothes

My Take On Picking Up The Clothes

My Take On Picking Up The Clothes • My assumptions:

My Take On Picking Up The Clothes • My assumptions:

My Take On Picking Up The Clothes • My assumptions: – Hang up shirts

My Take On Picking Up The Clothes • My assumptions: – Hang up shirts different than pants

My Take On Picking Up The Clothes • My assumptions: – Hang up shirts

My Take On Picking Up The Clothes • My assumptions: – Hang up shirts different than pants – There are 3 drawers in the dresser

My Take On Picking Up The Clothes • My assumptions: – Hang up shirts

My Take On Picking Up The Clothes • My assumptions: – Hang up shirts different than pants – There are 3 drawers in the dresser – Specific clothing goes in each dresser drawer

My Take On Picking Up The Clothes • My assumptions: – Hang up shirts

My Take On Picking Up The Clothes • My assumptions: – Hang up shirts different than pants – There are 3 drawers in the dresser – Specific clothing goes in each dresser drawer – There are enough shirt hangers

My Take On Picking Up The Clothes • My assumptions: – Hang up shirts

My Take On Picking Up The Clothes • My assumptions: – Hang up shirts different than pants – There are 3 drawers in the dresser – Specific clothing goes in each dresser drawer – There are enough shirt hangers – There are enough pants hangers

My Take On Picking Up The Clothes • My assumptions: – Hang up shirts

My Take On Picking Up The Clothes • My assumptions: – Hang up shirts different than pants – There are 3 drawers in the dresser – Specific clothing goes in each dresser drawer – There are enough shirt hangers – There are enough pants hangers – All hangers are immediately on hand

First Pass At General Level of Detail

First Pass At General Level of Detail

First Pass At General Level of Detail 1. Sort pile into 3 piles

First Pass At General Level of Detail 1. Sort pile into 3 piles

First Pass At General Level of Detail 1. Sort pile into 3 piles –

First Pass At General Level of Detail 1. Sort pile into 3 piles – Closet shirts, closet pants and dresser stuff

First Pass At General Level of Detail 1. Sort pile into 3 piles –

First Pass At General Level of Detail 1. Sort pile into 3 piles – Closet shirts, closet pants and dresser stuff 2. Hang up all shirts

First Pass At General Level of Detail 1. Sort pile into 3 piles –

First Pass At General Level of Detail 1. Sort pile into 3 piles – Closet shirts, closet pants and dresser stuff 2. Hang up all shirts 3. Hang up all pants

First Pass At General Level of Detail 1. Sort pile into 3 piles –

First Pass At General Level of Detail 1. Sort pile into 3 piles – Closet shirts, closet pants and dresser stuff 2. Hang up all shirts 3. Hang up all pants 4. Sort dresser pile into pile for each drawer

First Pass At General Level of Detail 1. Sort pile into 3 piles –

First Pass At General Level of Detail 1. Sort pile into 3 piles – Closet shirts, closet pants and dresser stuff 2. 3. 4. 5. Hang up all shirts Hang up all pants Sort dresser pile into pile for each drawer Fold and put away each drawer pile

Step 1 - Refinement

Step 1 - Refinement

Step 1 - Refinement 1. Sort pile into 3 piles: – closet (shirt &

Step 1 - Refinement 1. Sort pile into 3 piles: – closet (shirt & pants piles) and dresser piles

Step 1 - Refinement 1. Sort pile into 3 piles: – closet (shirt &

Step 1 - Refinement 1. Sort pile into 3 piles: – closet (shirt & pants piles) and dresser piles • From the original pile:

Step 1 - Refinement 1. Sort pile into 3 piles: – closet (shirt &

Step 1 - Refinement 1. Sort pile into 3 piles: – closet (shirt & pants piles) and dresser piles • From the original pile: – Pick up piece of clothing

Step 1 - Refinement 1. Sort pile into 3 piles: – closet (shirt &

Step 1 - Refinement 1. Sort pile into 3 piles: – closet (shirt & pants piles) and dresser piles • From the original pile: – Pick up piece of clothing – If shirt, place in pile 1

Step 1 - Refinement 1. Sort pile into 3 piles: – closet (shirt &

Step 1 - Refinement 1. Sort pile into 3 piles: – closet (shirt & pants piles) and dresser piles • From the original pile: – Pick up piece of clothing – If shirt, place in pile 1 – Else if pant, place in pile 2

Step 1 - Refinement 1. Sort pile into 3 piles: – closet (shirt &

Step 1 - Refinement 1. Sort pile into 3 piles: – closet (shirt & pants piles) and dresser piles • From the original pile: – – Pick up piece of clothing If shirt, place in pile 1 Else if pant, place in pile 2 Else place in pile 3

Step 1 - Refinement 1. Sort pile into 3 piles: – closet (shirt &

Step 1 - Refinement 1. Sort pile into 3 piles: – closet (shirt & pants piles) and dresser piles • From the original pile: – – – Pick up piece of clothing If shirt, place in pile 1 Else if pant, place in pile 2 Else place in pile 3 Repeat until original pile is empty

Step 2 - Refinement

Step 2 - Refinement

Step 2 - Refinement 2. Hang up all shirts

Step 2 - Refinement 2. Hang up all shirts

Step 2 - Refinement 2. Hang up all shirts • From the shirts pile

Step 2 - Refinement 2. Hang up all shirts • From the shirts pile

Step 2 - Refinement 2. Hang up all shirts • From the shirts pile

Step 2 - Refinement 2. Hang up all shirts • From the shirts pile – Pick up shirt

Step 2 - Refinement 2. Hang up all shirts • From the shirts pile

Step 2 - Refinement 2. Hang up all shirts • From the shirts pile – Pick up shirt – Get shirt hanger

Step 2 - Refinement 2. Hang up all shirts • From the shirts pile

Step 2 - Refinement 2. Hang up all shirts • From the shirts pile – Pick up shirt – Get shirt hanger – Hang up shirt

Step 2 - Refinement 2. Hang up all shirts • From the shirts pile

Step 2 - Refinement 2. Hang up all shirts • From the shirts pile – Pick up shirt – Get shirt hanger – Hang up shirt – Repeat until shirts pile is empty

Step 3 - Refinement

Step 3 - Refinement

Step 3 - Refinement 3. Hang up all pants

Step 3 - Refinement 3. Hang up all pants

Step 3 - Refinement 3. Hang up all pants • From the pants pile

Step 3 - Refinement 3. Hang up all pants • From the pants pile

Step 3 - Refinement 3. Hang up all pants • From the pants pile

Step 3 - Refinement 3. Hang up all pants • From the pants pile – Pick up pants

Step 3 - Refinement 3. Hang up all pants • From the pants pile

Step 3 - Refinement 3. Hang up all pants • From the pants pile – Pick up pants – Get pants hanger

Step 3 - Refinement 3. Hang up all pants • From the pants pile

Step 3 - Refinement 3. Hang up all pants • From the pants pile – Pick up pants – Get pants hanger – Hang up pants

Step 3 - Refinement 3. Hang up all pants • From the pants pile

Step 3 - Refinement 3. Hang up all pants • From the pants pile – Pick up pants – Get pants hanger – Hang up pants – Repeat until pants pile is empty

Step 4 - Refinement

Step 4 - Refinement

Step 4 - Refinement 4. Sort dresser pile into pile for each drawer

Step 4 - Refinement 4. Sort dresser pile into pile for each drawer

Step 4 - Refinement 4. Sort dresser pile into pile for each drawer •

Step 4 - Refinement 4. Sort dresser pile into pile for each drawer • From the dresser pile

Step 4 - Refinement 4. Sort dresser pile into pile for each drawer •

Step 4 - Refinement 4. Sort dresser pile into pile for each drawer • From the dresser pile – Pick up piece of clothing

Step 4 - Refinement 4. Sort dresser pile into pile for each drawer •

Step 4 - Refinement 4. Sort dresser pile into pile for each drawer • From the dresser pile – Pick up piece of clothing – If goes in drawer 1, place in drawer 1 pile

Step 4 - Refinement 4. Sort dresser pile into pile for each drawer •

Step 4 - Refinement 4. Sort dresser pile into pile for each drawer • From the dresser pile – Pick up piece of clothing – If goes in drawer 1, place in drawer 1 pile – Else if goes in drawer 2, place in drawer 2 pile

Step 4 - Refinement 4. Sort dresser pile into pile for each drawer •

Step 4 - Refinement 4. Sort dresser pile into pile for each drawer • From the dresser pile – Pick up piece of clothing – If goes in drawer 1, place in drawer 1 pile – Else if goes in drawer 2, place in drawer 2 pile – Else place in drawer 3 pile

Step 5 - Refinement

Step 5 - Refinement

Step 5 - Refinement 5. Fold and put away each drawer pile

Step 5 - Refinement 5. Fold and put away each drawer pile

Step 5 - Refinement 5. Fold and put away each drawer pile • For

Step 5 - Refinement 5. Fold and put away each drawer pile • For each dresser pile:

Step 5 - Refinement 5. Fold and put away each drawer pile • For

Step 5 - Refinement 5. Fold and put away each drawer pile • For each dresser pile: – Go to the next pile

Step 5 - Refinement 5. Fold and put away each drawer pile • For

Step 5 - Refinement 5. Fold and put away each drawer pile • For each dresser pile: – Go to the next pile – Note which drawer this pile is for

Step 5 - Refinement 5. Fold and put away each drawer pile • For

Step 5 - Refinement 5. Fold and put away each drawer pile • For each dresser pile: – Go to the next pile – Note which drawer this pile is for • Pick up a piece of clothing

Step 5 - Refinement 5. Fold and put away each drawer pile • For

Step 5 - Refinement 5. Fold and put away each drawer pile • For each dresser pile: – Go to the next pile – Note which drawer this pile is for • Pick up a piece of clothing • Fold piece of clothing

Step 5 - Refinement 5. Fold and put away each drawer pile • For

Step 5 - Refinement 5. Fold and put away each drawer pile • For each dresser pile: – Go to the next pile – Note which drawer this pile is for • Pick up a piece of clothing • Fold piece of clothing • Place folded clothing neatly in drawer

Step 5 - Refinement 5. Fold and put away each drawer pile • For

Step 5 - Refinement 5. Fold and put away each drawer pile • For each dresser pile: – Go to the next pile – Note which drawer this pile is for • • Pick up a piece of clothing Fold piece of clothing Place folded clothing neatly in drawer Repeat until this pile is empty

Step 5 - Refinement 5. Fold and put away each drawer pile • For

Step 5 - Refinement 5. Fold and put away each drawer pile • For each dresser pile: – Go to the next pile – Note which drawer this pile is for • • Pick up a piece of clothing Fold piece of clothing Place folded clothing neatly in drawer Repeat until this pile is empty – Repeat until have done all dresser piles

My Take On Picking Up The Clothes - Refinement

My Take On Picking Up The Clothes - Refinement

My Take On Picking Up The Clothes - Refinement • Some possible next steps

My Take On Picking Up The Clothes - Refinement • Some possible next steps

My Take On Picking Up The Clothes - Refinement • Some possible next steps:

My Take On Picking Up The Clothes - Refinement • Some possible next steps: – Continue refining (folding, etc)

My Take On Picking Up The Clothes - Refinement • Some possible next steps:

My Take On Picking Up The Clothes - Refinement • Some possible next steps: – Continue refining (folding, etc) – Look for optimizations

My Take On Picking Up The Clothes - Refinement • Some possible next steps:

My Take On Picking Up The Clothes - Refinement • Some possible next steps: – Continue refining (folding, etc) – Look for optimizations • Are there needless steps?

My Take On Picking Up The Clothes - Refinement • Some possible next steps:

My Take On Picking Up The Clothes - Refinement • Some possible next steps: – Continue refining (folding, etc) – Look for optimizations • Are there needless steps? • Are there repeated steps?

My Take On Picking Up The Clothes - Refinement • Some possible next steps:

My Take On Picking Up The Clothes - Refinement • Some possible next steps: – Continue refining (folding, etc) – Look for optimizations • Are there needless steps? • Are there repeated steps? • Faster way of doing it?

My Take On Picking Up The Clothes - Refinement • Some possible next steps:

My Take On Picking Up The Clothes - Refinement • Some possible next steps: – Continue refining (folding, etc) – Look for optimizations • Are there needless steps? • Are there repeated steps? • Faster way of doing it? – Test it!

My Take On Picking Up The Clothes - Refinement • Some possible next steps:

My Take On Picking Up The Clothes - Refinement • Some possible next steps: – Continue refining (folding, etc) – Look for optimizations • Are there needless steps? • Are there repeated steps? • Faster way of doing it? – Test it! • Does it work?

My Take On Picking Up The Clothes - Refinement • Some possible next steps:

My Take On Picking Up The Clothes - Refinement • Some possible next steps: – Continue refining (folding, etc) – Look for optimizations • Are there needless steps? • Are there repeated steps? • Faster way of doing it? – Test it! • Does it work? • Mistakes in the algorithm?

Clear and Unclear Windows Clear Unclear

Clear and Unclear Windows Clear Unclear