2.1.3 Thinking Procedurally Flashcards
1
Q
Decomposition
A
- the first stage of thinking procedurally
- breaking down a large complex problem into smaller more manageable subproblems which can be solved more easily
- the project becomes easier to manage and can be divided between a team
- top down design is one method of decomposing a problem
2
Q
Decomposition example
A
- games can be divided into sub programs [1]
- sub programs can then be programmed as subroutines [1]
3
Q
Top down design
A
- divided problems into levels of complexity
- problems are broken down into smaller sub problems until each problem is a single task and ideally a self contained module or subroutine
- each sub problem can be solved using a single subroutine
4
Q
Subroutine benefits
A
- subroutines can be developed and tested separately so they are self contained
- thus each subroutine is much simpler to test and maintain [1]
- subroutines can be reused to prevent duplicate code [1]