Download presentation
Presentation is loading. Please wait.
1
Designing Software
2
Designing Software Algorithm definition
3
Designing Software Algorithm definition
A set of well-defined instructions for carrying out a particular task.
4
Designing Software Algorithm definition
A set of well-defined instructions for carrying out a particular task. Characteristics of a good algorithm :
5
Designing Software Algorithm definition
A set of well-defined instructions for carrying out a particular task. Characteristics of a good algorithm : Predictable
6
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
7
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
8
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
9
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
10
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
11
Designing Software Recipe analogy
12
Designing Software Recipe analogy Predictable
13
Designing Software Recipe analogy Predictable Deterministic
14
Designing Software Recipe analogy Predictable Deterministic
Not subject to chance
15
Designing Software Recipe analogy
Predictable … you know what the recipe makes Deterministic Not subject to chance
16
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
17
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:
18
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
19
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
20
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
21
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
22
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
23
Designing Software Can you think of any examples of “algorithms” in your daily life?
24
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. 27
25
A Tougher Algorithm
26
A Tougher Algorithm Your mom just dumped your clean laundry on your bedroom floor...
27
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.
28
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
29
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
30
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
31
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
32
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
33
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
34
My Take On Picking Up The Clothes
35
My Take On Picking Up The Clothes
My assumptions:
36
My Take On Picking Up The Clothes
My assumptions: Hang up shirts different than pants
37
My Take On Picking Up The Clothes
My assumptions: Hang up shirts different than pants There are 3 drawers in the dresser
38
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
39
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
40
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
41
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
42
First Pass At General Level of Detail
43
First Pass At General Level of Detail
Sort pile into 3 piles
44
First Pass At General Level of Detail
Sort pile into 3 piles Closet shirts, closet pants and dresser stuff
45
First Pass At General Level of Detail
Sort pile into 3 piles Closet shirts, closet pants and dresser stuff Hang up all shirts
46
First Pass At General Level of Detail
Sort pile into 3 piles Closet shirts, closet pants and dresser stuff Hang up all shirts Hang up all pants
47
First Pass At General Level of Detail
Sort pile into 3 piles Closet shirts, closet pants and dresser stuff Hang up all shirts Hang up all pants Sort dresser pile into pile for each drawer
48
First Pass At General Level of Detail
Sort pile into 3 piles Closet shirts, closet pants and dresser stuff Hang up all shirts Hang up all pants Sort dresser pile into pile for each drawer Fold and put away each drawer pile
49
Step 1- Refinement
50
Step 1- Refinement Sort pile into 3 piles:
closet (shirt & pants piles) and dresser piles
51
Step 1- Refinement Sort pile into 3 piles: From the original pile:
closet (shirt & pants piles) and dresser piles From the original pile:
52
Step 1- Refinement Sort pile into 3 piles: From the original pile:
closet (shirt & pants piles) and dresser piles From the original pile: Pick up piece of clothing
53
Step 1- Refinement Sort pile into 3 piles: From the original pile:
closet (shirt & pants piles) and dresser piles From the original pile: Pick up piece of clothing If shirt, place in pile 1
54
Step 1- Refinement Sort pile into 3 piles: From the original pile:
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
55
Step 1- Refinement Sort pile into 3 piles: From the original pile:
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
56
Step 1- Refinement Sort pile into 3 piles: From the original pile:
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
57
Step 2- Refinement
58
Step 2- Refinement 2. Hang up all shirts
59
Step 2- Refinement 2. Hang up all shirts From the shirts pile
60
Step 2- Refinement 2. Hang up all shirts From the shirts pile
Pick up shirt
61
Step 2- Refinement 2. Hang up all shirts From the shirts pile
Pick up shirt Get shirt hanger
62
Step 2- Refinement 2. Hang up all shirts From the shirts pile
Pick up shirt Get shirt hanger Hang up shirt
63
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
64
Step 3- Refinement
65
Step 3- Refinement 3. Hang up all pants
66
Step 3- Refinement 3. Hang up all pants From the pants pile
67
Step 3- Refinement 3. Hang up all pants From the pants pile
Pick up pants
68
Step 3- Refinement 3. Hang up all pants From the pants pile
Pick up pants Get pants hanger
69
Step 3- Refinement 3. Hang up all pants From the pants pile
Pick up pants Get pants hanger Hang up pants
70
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
71
Step 4- Refinement
72
Step 4- Refinement 4. Sort dresser pile into pile for each drawer
73
Step 4- Refinement 4. Sort dresser pile into pile for each drawer
From the dresser pile
74
Step 4- Refinement 4. Sort dresser pile into pile for each drawer
From the dresser pile Pick up piece of clothing
75
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
76
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
77
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
78
Step 5- Refinement
79
Step 5- Refinement 5. Fold and put away each drawer pile
80
Step 5- Refinement 5. Fold and put away each drawer pile
For each dresser pile:
81
Step 5- Refinement 5. Fold and put away each drawer pile
For each dresser pile: Go to the next pile
82
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
83
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
84
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
85
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
86
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
87
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
88
My Take On Picking Up The Clothes - Refinement
89
My Take On Picking Up The Clothes - Refinement
Some possible next steps
90
My Take On Picking Up The Clothes - Refinement
Some possible next steps: Continue refining (folding, etc)
91
My Take On Picking Up The Clothes - Refinement
Some possible next steps: Continue refining (folding, etc) Look for optimizations
92
My Take On Picking Up The Clothes - Refinement
Some possible next steps: Continue refining (folding, etc) Look for optimizations Are there needless steps?
93
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?
94
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?
95
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!
96
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?
97
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?
98
Clear and Unclear Windows
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.