Sequence
Executing instructions one after another
Selection (branching)
Iteration
Enables us to repeat sections of code
When is a FOR loop (count-controlled loop) used?
When the required number of iterations is known ahead of the execution
When is a WHILE loop (condition-controlled loop) used?
When the required number of iterations is unknown as the variable used to determine when the iteration ends is changing within the iteration itself
Nest structure
Programming constructs inside one another
Recursion
When a subroutine calls itself from within another subroutine
What 3 characteristics should a recursion subroutine have?
Without the 3 characteristics, what would the recursion subroutine result in?
A stack overflow
Variable
Used to store information to be referenced and manipulated in a computer program
Local variable (4)
Global variable (4)
Scope of a variable
Procedure
Function
Modularity
Concept of breaking a large program into smaller chunks
- Each module carries out a single, specific task
Integrated Development Environments
Common features of IDEs
Code editor
A text area for programmers to enter code directly into the IDE; often supports features e.g. syntax highlighting, automatic indentation
Error diagnostics
Reports errors in the code and where they can be found
Translators
Program that converts high level code into machine code