The Program Development Cycle
- We will look at a classical method of software design called the Waterfall Model.
- This model is pictures in your book on page 3.
- It consists of a number of interrelated steps in three phases.
- Problem Solving Phase - attempt to understand the problem and specify what the software should do.
- Implementation Phase - Turn the design from the previous phase into a working software system.
- Maintenance Phase - Modify, repair and extend the existing product.
- The Problem Solving Phase
- Analysis and Specification
- You need to determine exactly what the problem you will be solving is.
- Sometimes problems are well specified and you know what to do.
- For example, any problem on page 86 or 87.
- Sometimes this is less so
- like this one
- You need to read and understand the problem.
- You need to determine what you have as input and what you are to produce as output.
- You frequently need to ask for clarification, explanation or further information at this phase of the development process.
- General Solution
- Once you understand the problem how do you solve it?
- An algorithm is a set of instructions which solve a problem in a finite amount of time.
- Algorithms come in two flavors.
- Very detailed solutions to well known problems (see the algorithms book)
- A general plan, much like an outline, for solving a problem.
- While I expect you will eventually become good at the first, I am very interested in you becoming good at the second.
- The algorithm provides a blue-print, or a plan for constructing your program.
- We will work on these throughout the semester.
- I ask that you make an honest attempt to create algorithms BEFORE you implement your code.
- Solution Verification
- Once you have an algorithm, you should test this algorithm.
- To do this, you need example input and the corresponding output.
- You should step through your algorithm, checking to see if the input produces the output (your algorithm works)
- As you create the algorithm, you will discover test data.
- Is there any point in implementing an algorithm which does not work?
- Implementation Phase
- Concrete Solution
- Translate your algorithm to a program.
- This involves knowing the programming language.
- And understanding how this language works.
- Test
- Use the test data from the design phase to make sure your program works for this data.
- As you implement the code, you will frequently discover other places/data that you should test.
- This is an important, yet frequently ignored phase of software development.
- Maintenance Phase
- Use the program.
- Maintain
- Fix bugs (then test again)
- Add features (then test again)
- This is a loop, frequently you will return to a previous stage as you try to complete a later stage.