Professional Documents
Culture Documents
Decomposition - breaking down a complex problem into smaller more manageable parts
Dealing with many different stages of a problem at once is much more difficult than breaking
a problem down into smaller problems to solve each one at a time.
Advantages of decomposition;
- Makes problems easier to solve
- Different people can work on different parts of the problem at the same time,
speeding up development
- COmponents of one program can be used in another
Subprograms are used to break down a larger program into a series of smaller more
manageable problems.
Benefits of subprograms:
- Easier to code
- Easier to debug code
- Can be reused in another program
- Speeds up program development
Inputs:
- Anything supplied to the program so it can meet its goals
- Usually input by the user
- Consider an appropriate variable name and datatype for the input
Process:
- Consider what calculations need to be performed while the program runs
- Does any data need to change format or datatype
Output:
- Consider what your program needs to output
- Consider what form the output needs to be in
- Consider an appropriate variable name and datatype for any output
Pseudocode allows us to lay down the logic of a problem without having to worry about the
strict rules and syntax of a particular language.