What is the difference between an indefinite and a definite iteration? - Definite is where the amount of loops can be predicted or is known beforehand whereas with indefinite it is unknown and continues until a condition is met.
Which sequence is generated by this recurrence relation? - The Fibonacci sequence.
Why is understanding stack frames relevant to understanding the usefulness of recursion? - Stack frames generate every time there is a recursive call which takes up memory and time.
What is a datum? Give some examples of how a datum could be interpreted. - A singular piece of data, represented by a series of bits. E.g characters
- A paradigm is a standard, perspective, or set of ideas.
- To design is to plan or mark out the form and method of solution.
Structured design is a disciplined process of deciding which components interconnected in which way will solve some well-specified problem.
A problem is divided into smaller and smaller sub problems, so that each sub problem will eventually correspond to a component of the system which solves the problem.
The partitioning process into smaller and smaller sub problems is done until the sub problems are:
- manageably small and
- solveable separately i.e relatively independent of one another
A good design is an exercise in partitioning and organising the pieces of the system so that each is cohesive and loosely coupled. (The pieces of the system are referred to as modules or units or components and can be implemented with subroutines.
Cohesion measures the strength of the interconnection between elements within a module. To achieve cohesion, highly interrelated parts of the real-world problem should be in the same piece of the software system, i.e things that belong together should go together.
To minimalise coupling among modules:
- Subroutines or modules should only be allowed to access that data which they need to perform their assigned task
- All data transfer between modules is visible in the module parameters
- There must be no hidden flows of data via global variables or shared data areas
- There should be no control information passing between modules, e.g Boolean flags
- The number of module parameters should be minimal
The focus of structured design is the identification of components of the system and how they interact, i.e the software architecture of the computerised system, and not on the internal design of the components.
For the internal design of the components, i.e the program source code for subroutines and the program which calls these subroutines, we use structured programming.
https://www.youtube.com/watch?v=jfQcKLKvjeQ
Stepwise refinement starts with the major steps.
Each major step is then refined into a more detailed sequence of steps.
Each one of these more detailed steps is then refined and so on until a stage is reached where the steps can be replaced by programming language statements,




