2.2.1 Programming Techniques Flashcards
Algorithm
A set of rules or a sequence of steps specifying how to solve a problem
Programming constructs
Sequencing
Selecting
Iteration
Variables
Identifiers given to memory locations whose contents will change during the course of the program
Global variable
A variable that can be used anywhere in the program
Local variable
Can only be used within the subroutine in which it is declared
Selection
Decisions made that determine the execution
Sequence
All lines are executed in order
Iteration
Code is repeated/looped until specific conditions are met
Subroutine
A named block of code which performs a specific task within a program
By value
It’s actual value is passed into the subroutine
By reference
The address is passed into the subroutine
Modularity
Breaking down large tasks into small subtasks.
Recursion
A subroutine that is defined in terms of itself
Parameter
Data structures passed into a procedure or function
IDE (integrated development environment)
A software package that helps write the code easily
Procedural programming
High level languages such as Basic and Pascal
Debugging
Removing errors from code
Syntax, logic and run-time
Classes
A blueprint or template for an object. It defines the attributes and behaviours(methods) of object within the class
Constructor
Used to create object in a class
Instantation
The creation of a new object
Encapsulation
Bundling data and actions in a class
Inheritance
Where a new class is formed by inheriting all the methods and attributes of another
Polymorphism
A programming languages ability to process objects differently depending on their class