Process Design (Specification)
description
Transcript of Process Design (Specification)
![Page 1: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/1.jpg)
Process Design(Specification)
![Page 2: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/2.jpg)
2
Recall the Four Steps of Problem Solving*
• Orient• Plan• Execute• Test
These apply to any kind of problem, not just spreadsheet development, programming, or process design, but we will focus on those kinds of problems in this class
* [Carlson and Bloom, “The Cyclic Nature of Problem Solving: An Emergent Multi-Dimensional Problem Solving Framework”, Educational Studies in Mathematics, Vol. 58 Number 1, 2005]
![Page 3: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/3.jpg)
3
Specification
• We’ve talked about doing the requirements (the orient phase… what we want to have happen)
• Now we’re ready to talk about the specification or design phase (the planning phase… how it should happen)
• Our tool for developing and communicating a design is the flow chart
![Page 4: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/4.jpg)
4
Problem-Solving Techniques
• Flowcharts are a visual technique for designing a process (figuring out how to do something)
• Before we learn about flow charts (a technique for “how” problems), let’s look at a couple of useful visual techniques for solving other kinds of problems
• For more on the ideas here, see Dan Roam’s website, www.digitalroam.com
![Page 5: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/5.jpg)
5
“When” Problems
• Suppose we want to make a master plan showing team leaders when each step of a complex process they are directing and coordinating will take place
• When -> timeline• Since we need to convey a large amount of
precise information, a Gantt Chart is an appropriate visual tool
![Page 6: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/6.jpg)
6
Gantt Chart Example
![Page 7: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/7.jpg)
7
GANTT with Dependencies
![Page 8: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/8.jpg)
8
Baseline GANTT(shows comparison, change)
![Page 9: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/9.jpg)
9
How Many/How Much
• Suppose we need to answer how many/how much
• Bar charts are often used • Pie charts are another option (controversial
because it is harder to compare pie slices than bars)
• There are plenty of interesting and clever variations… such as the word usage chart (next slide)
![Page 10: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/10.jpg)
10
Variation on Bar ChartWord Usage in 2008 McCain Speech
![Page 11: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/11.jpg)
11
Example: Seeing the Market
These charts show how much versus when.They give much more insight than a numericallist of prices.
![Page 12: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/12.jpg)
12
Flowcharts: “How”
• Flowcharts are a visual tool for specifying a process
• They can be as high level or as detailed as we need them to be
• They use symbols and arrows to represent steps and choices
![Page 13: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/13.jpg)
13
Flowchart Symbols
Flowline: Connects symbols and indicates the flow of logic. It is a one way street.
Input/Output: Data to be read or displayed are described inside.
Terminal: Represents the beginning or end of a task.
Processing: The process description is includedinside the symbol.
Decision: Used for logic/comparison operations. Hasone entry and two exits.
![Page 14: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/14.jpg)
14
One more…
Continuation
![Page 15: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/15.jpg)
15
Simple Processes
• A simple process has no decisions in it; you always do it the same way
• As a result, its flowchart is just a straight line of boxes connected by arrows
• Example: most recipes, instruction sheets with assemble-it-yourself furniture, simple calculations
![Page 16: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/16.jpg)
16
Simple Process: Compound Interest
• Goal: Given a number N of years, an amount P of money (principal), and an annual interest rate R, calculate the total amount of money T you will have after P is invested for N years at rate R, using interest which is compounded annually. T = P(1+R)N
• Test 1: P = 100, N = 1, R = 5% (.05): 105• Test 2: P = 100, N = 7, R = .05: 140• Test 3: P = 0, N = 7, R = .05: 0• Test 4: P = 100, N = 7, R = 0: 100• Test 5: P = 100, N = 0, R = .05: 100
![Page 17: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/17.jpg)
17
Just for interest • P = 100, N = 20, R = .05 gives 265• P = 100, N = 30, R = .05 gives 432
• By contrast, simple interest at 5 percent gives $5 per year, so after 20 years you have a total of $200; after 30 you have $250.
• If R is, say, 8%, the difference is even more striking.
![Page 18: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/18.jpg)
Storing Information
• In this process we have to keep track of some information, like how much principal we have, what the interest rate is, etc.
• We’ll use variables to store these values
![Page 19: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/19.jpg)
19
Variables
• A variable is a name used to refer to a quantity whose value can change
• You can think of a variable as the name of a container that holds a value
• (A constant is a name for a quantity whose value does not change.)
• A spreadsheet cell is a good example of a container that can hold a value
![Page 20: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/20.jpg)
20
Math Variables vs Programming/Spreadsheet Variables
• In math, a variable is used in an equation to represent some single quantity.
• If we are given the equation 3x = x + 6, we can solve this equation for x and get x = 3. You can check the correctness by substituting 3 for x on each side and seeing that you get the same value (9)
• An “equation” like x = x + 1 would be meaningless; it has no solution
![Page 21: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/21.jpg)
21
Programming Variables• Programming variables and spreadsheet locations are a
place to store a value, which can change• The assignment statement x = 4 means to store the value
4 in location x. It is not really an equation, though it looks like one
• The pair of assignments, x = 4x = x + 1
means to first store a 4 in location x, and then take the current contents (4), add 1, and store the result (5) in location x. The order of the statements is extremely important.
![Page 22: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/22.jpg)
22
Compound Interest Calculatorbegin
R = annual rateN = number of years
P = principal
T = P*(1+R)^N
Output T
end
We used variables R, N, P, and T.
Arrows in a flowchart are likeone-way streets; once you go down one, you can’t back up
![Page 23: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/23.jpg)
23
Example Spreadsheet
• The spreadsheet called Interest Calculator 1 has this formula in it
• Let’s take a minute to see how to build this spreadsheet
![Page 24: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/24.jpg)
24
Algorithm
• The interest rate calculator is an example of a simple algorithm: a type of effective method in which a list of well-defined instructions for completing a task will, when given an initial state, proceed through a well-defined series of steps, eventually terminating in an end-state
• Thought to be named for Al-Khwārizmī, Persian astronomer and mathematician
![Page 25: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/25.jpg)
25
Back to the Candy Machine…
![Page 26: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/26.jpg)
User Interface
• The first step in the design is often to think about the user interface
• What does the user interact with?• What are the possible events that can occur?
![Page 27: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/27.jpg)
Candy Machine Objects and Events• Coin slot
– User inserts a coin• Candy slot
– Opens so a piece of candy can come out• Handle
– The user attempts to turn the handle• Coin receptacle
– It can be full or not full
• These are all the objects in the requirements that have events• However: how does the machine know if there is a correct coin in the
coin slot? Or any coin at all? It looks like the handle turning mechanism needs to be able to check some things.
![Page 28: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/28.jpg)
28
Handle Functions• The turn of the handle tries to send a coin to the coin
receptacle. The handle only allows the correct coins through and won’t turn otherwise
• The handle should not turn if the coin receptacle is full• The designer is someone like a mechanical engineer who
can figure out whether we can build a handle mechanism like this within our budget, and what the tradeoffs are
• We won’t look at the mechanical aspect of this, but we can express the logical flow of the solution in a flow chart
![Page 29: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/29.jpg)
Turning the Handle
• The next slide shows the flowchart for the event where someone tries to turn the handle of the candy machine
• It shows the use of the begin/end, conditional, and process step boxes
![Page 30: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/30.jpg)
Handle Flowchartstartbegin
attempt to turn handle
correctcoin in slot?
handle does not turn
handle turnscoin goes into receptaclecandy slot opens
receptacle has room?
end
no yes
no yes
![Page 31: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/31.jpg)
From Use Cases to Flowchart
• In the candy machine example, we have several objects, but only one event that requires a process: trying to turn the handle
• The use cases were various complete scenarios of an interaction with the machine
• We abstracted information from several use cases to design the handle turning event
• We use the tests to make sure we put the pieces together correctly
![Page 32: Process Design (Specification)](https://reader036.fdocuments.us/reader036/viewer/2022062323/568164de550346895dd73990/html5/thumbnails/32.jpg)
32
Event-Driven Design
• This type of design is called “event driven” because it works by analyzing what the events are in the process and what should happen as a result of each event
• This has turned out to be a highly effective way of designing processes