Flashcards
4.1
Cards in this deck (11)
- 1Pointer/referenceA link to data elsewhere in memory
- 2RecordsA group of values that can be of different data types
- 3Procedural programmingA combination of statements that include:
Variable deceleration (creating a variable and its type)
Constant deceleration (creating a constant and its type)
Iteration - repeating (looping) through a section of code under given conditions
Assignment - assigning a value to a variable/constant
Selection - branching from one section of code to another depending on a condition
subroutine - 4SubroutineA pre defined section of code that can be called at any time
Procedure - a subroutine with no output
Function - subroutine with an output
Used to block code together so that it can be called instead of repeated each time and improves readability - 5Nested iterationWhen a branch or loop is contained within another branch or loop
- 6Exception handlingA try block will deliver code to its catch block when a runtime error occurs. A finally block will always be run. Typically used to close files and prevent memory leaks.
- 7Local VariablesCan only be accessed in the subroutine they were created. They cannot be altered or accessed by other subroutines.
- 8Global variablesUsable by all subroutines. Create a large memory footprint as memory locations cannot be reused.
- 9RecursionA subroutine that calls itself. Can be used to make efficient calls to different data. Can cause memory overflows.
- 10Stack framesWhen a subroutine is run a stack frame is created to store:
Return address
Local Variables
Parameters - 11Object orientated programsDefine instances of classes and run them classes and execute methods within the objects.
Information
- Description
- Flashcards on 4.1, created by James John on 10/05/2022.
- Created by
- James John
- Views
- 0
- Rating