Chapter 5: How can programs be used to solve problems Flashcards
5 stages of developing a program
Gather requirements Plan solutions Write code Test and refine code Implement code
Gather requirements
Determine the nature of problem, why program is needed and what the program is expected to do
Tasks:
- Interview intended audience of the program
- Identify the inputs and outputs
Plan solutions
Consider the options available before any code is written, and to choose an algorithm based on the resources available
Tasks:
- Manually solve different simplified examples of the problem and generalise the steps to solve the problem
- Try different ways to break down the problem
- Compare the problems to other problems that have been solved before
- Estimate the amount of effort or time needed to write the code
- Write out possible algorithms with flowchart or pseudo-code
Write code
Write code that performs algorithm as planned
Tasks:
- W r i t e c o d e
Test and refine code
Testing is the process by which defects in a program can be detected
Test case is a set of inputs and the corresponding set of outputs for a program used to verify whether the program works as intended
Task:
- Run code through one or more test cases
- Evaluate whether the program is working as intended
Implement code
When code is used by intended audience
Tasks:
- Training users to use the programs
- Transitioning from old program to new program
- Evaluate effectiveness of program in solving problem