Title: We Need a Plan
1SOFTWARE DEVELOPMENT METHOD
http//sern.ucalgary.ca/courses/cpsc/451/W98/Compl
exity3.gif http//www.vantagepoint.ca/images/bluep
rint.jpg http//www.emb.org.hk/irooms/eservices/es
erviceshelp/eServices20Help20Maual/RoBoHelp/Scho
ol/en/!SSL!/WebHelp/appendixIa.JPG
2SOFTWARE DEVELOPMENT METHOD
The process of developing a computer program to
solve a specific problem
- Specify the problem requirements
- Analyze the problem
- Design the algorithm
- Coding
- Testing and verification
- Maintenance
- Also known as the Waterfall Method
- one step is dependent on the previous step.
3SOFTWARE DEVELOPMENT METHOD Fun Example
Assemble a Swing Set
I. Problem Specification to assemble a swingset
from a kit II. Problem Analysis What are the
inputs? The objects! The Things! Need a kit (go
buy one) Does it have all the parts in the kit?
Screws, braces, directions, etc. Need tools
scissors, screw driver, wrench What is the
output? The result? A swing set III. Design
Plan for doing the work Step 1 Major tasks
refinement into more detailed subtasks 1.
Assemble the individual components Assemble the
frame Assemble the seats Assemble the
teetertooter Assemble the slide 2. Put the
components together Step 2 Now, Convert
the outline of the steps into a
detailed step-by-step list, the algorithm.
IV. Follow the detailed steps/directions Implemen
t the algorithm! V. Test the swing Is it safe?
Any sharp edges? What is the max weight? OK
kids come play!!! Released for use VI. Check
on it occasionally maintenance Add a chin-up
bar Check for broken parts Upgrade the slide,
etc.
4SOFTWARE DEVELOPMENT METHOD
- 1. Specify the problem requirements
http//www.combourg.com/granit/4.jpg -
- Establish the level of abstraction
- Understand the problem.
- What is NOT the problem?
- What is essential to solve the problem?
- Eliminate unnecessary unimportant
information. - Gather missing information.
-
-
State the Problem Specification We will
simplify the specification to a formal
one-line statement of the problem. Be clear
and concise - To calculate To
produce To determine
5SOFTWARE DEVELOPMENT METHOD
Identify the input data needed (inputs)
What are the things or objects? Ex.
Names, stock numbers, quantities
What is the data you must work with or
manipulate? How should the data be
input? What is the format or appearance
of the data? What is the range of
acceptable values?
Identify the output data (outputs)
Outputs are the desired results of the
processing. How are the results to
be presented to the user? May need
to specify formulae and special constants. What
is the general appearance of the output? Report
headings, summary information, etc.
6SOFTWARE DEVELOPMENT METHOD
2. Analysis continued Identify data needed
for processing only. Begin a descriptive list
of the data elements required. The list will
grow in detail as the process continues.
Contains data that is input, data used in
processing, data to be output.
Data Dictionary a formal list documenting the
data elements required to solve the
problem. Variable Name Use/Description
Acceptable Values Data Type---------------
--------------------------------------------------
-------------------------------------------- StuNa
me name of a student alphabet
?? SocSecurityNum social
security number pos 8 digits ??
7SOFTWARE DEVELOPMENT METHOD
- 3. Design Develop an algorithmAlgorithm a list
of steps, that when followed will solve the
problem. - Specifies actions sequence (one after
another).Usual Technique Divide and
Conquer Breaks a large problem into many
smaller ones. Also called algorithm
refinement. - --------------------------------------------------
--- - STEP 1 List major tasks and refine then, in
successive steps, define the subtasks, - then define subtasks under the subtasks,
-
- Tasks are expressed as descriptive English
statements. http//mathcs.holycross.edu/croyden
/csci150spr03/notes/lec15_divideConquer.gif
8SOFTWARE DEVELOPMENT METHOD
- 3. Design continuedSimple programs follow this
generic patternMajor Task Identification 1.0
Get the data 2.0 Perform the computation(s)
(Processing) 3.0 Display the results - Now refine use indentation for subtasks
- 1.0 Get the data 1.1 Prompt for the
data 1.2 Get the data .. - http//faculty.frostburg.edu/cosc/htracy/UML/IPO_f
lowchart.gif
Subtasks
9SOFTWARE DEVELOPMENT METHOD
- 3. Design continued
- Step 1 Major task, subtask identification
- STEP 2 Convert tasks into the algorithmAlgorith
m A series of instructions, which if
performed in order, will solve a problem. - An algorithm must 1. terminate, 2. be
precisely defined (no ambiguity), 3. effectively
solves the problem. - Write the algorithm using pseudocode, using
informal English-like statements.Each line of
the algorithm will be converted into the chosen
implementation (high-level) language most of
the time.
10SOFTWARE DEVELOPMENT METHOD
- 3. Design continued
- STEP 1 Major task, subtask identification
- STEP 2 Convert tasks into the algorithmDO NOT
USE programming language syntaxDO USE variable
names as an abstraction of memory
locations. Variable a named data element in a
program. The compiler will associate a relative
memory location - with the name.
- Variables have values that change over time.
- Walk through the algorithm to simulate
execution. - Create a Trace Table to show how
the values of data elements will change during
execution. - Show the Expected Output
11SOFTWARE DEVELOPMENT METHOD
- 3. Design continued
- STEP 1 Major task, subtask identification
- STEP 2 Convert tasks into the algorithm
- Examples of Good Pseudocode Statements
- GOOD Display Enter Weight (lbs)
PatientWeight - GOOD Set SumScores to sum of Test1 and Test2
and Test3 - GOOD Display Sum of Test Scores SumScores
- BAD Add all the test scores.
- BAD Print all of the test scores
- Use the following English commands
- To Get Data input, read, get from
keyboard, get - To Output Data display, print, put on
monitor, put - To Calculate calculate, set, determine,
compute
Prints contents of memory location called
SumScores
12SOFTWARE DEVELOPMENT METHOD
- Where are we?
- Specify the problem requirements
- Analyze the problem
- Design the algorithmMajor task / Subtask
Identification Algorithm Design - Coding
- Testing and verification
- Maintenance
13SOFTWARE DEVELOPMENT METHOD
- 4. Coding (Implement the Algorithm more on this
later) - Step 1 Choose the C data types based on the
internal storage representation and the max
and min values of the data - Is it an Integer? Real? or Character?
- Step 2 Convert the algorithm to C code. Write
out the C code by hand! - Step 3 Compile the program Create your source
file, compile, execute. Debug the code locate
and correct errors. Code (a little at a time),
Compile, and Debug in increments.
14SOFTWARE DEVELOPMENT METHOD
- 5. Testing and Verification Verification
Is the output correct? Are the results what
they should be? Have I done it right?
Output here should match Design Output. - http//www.first-to-fly.com/Adventure20Images/190
120Glider20Replica/Testing20pitch.jpg
Validation Have I done the right thing?
Does the solution meet the clients
expectation? Have the requirements been met?
15SOFTWARE DEVELOPMENT METHOD
- 6. Maintenance Fix Problems Logic errors Make
improvements, Upgrade or replace
equipment (tech change), Most expenive part
of Software, Legacy code old code that has
had many changes and revisions. - Especially difficult to follow.
- http//www.deerparkmanagement.com/images/ma
intenance.jpg
16SOFTWARE DEVELOPMENT METHOD
- 6. Maintenance continuedALWAYS CONSIDER
MAINTENANCE, especially in design and coding
steps. - The following contribute to low
maintenance Reusability of code, Good
documentation, Structured programming, Kiss
method.
17SOFTWARE DEVELOPMENT METHOD
- Specify the problem requirements
- Analyze the problem
- Design the algorithm
- Coding
- Testing and verification
- Maintenance
- End Software Development Method