2.2 Problem solving and programming Flashcards
What is branching
A programming control structure where the code selects one or more alternative paths depending on the evaluation of a Boolean expression
What are functions
A subroutine that can be called to perform a task or calculation and will always return a value
What are global variables
A variable declared in the main program which exists outside any of the subroutines but can be used anywhere in the program
Integrated development environment
A software package the allows a user to develop and implement code more easily with features for editing, debugging, version control, testing and compilation
Iterations
A programming control structure where as set of statements is repeated either a fixed number of times or until a condition is met
Local variables
A variable declared within a subroutine of a program which only exists and can be used within that subroutine
Modularity
Breaking down a complex problem into simpler, self-contained components called modules
What is each module
An implementation of a specific subtask required to solve a problem
What is object oriented programming
Pp Where the system is viewed as a set of objects with their own attributes and procedures that can interact with each other
What is all processing done by in OOP
Objects
Passing by reference
Passing the address or pointer of the required value into a procedureP
Passing by value
Creating a temporary local copy of the actual value of a variable and passing it into the procedure
Parameters
The data structures required to be passed into a subroutine
Procedures
A subroutine that is called by simply writing its name in the code. Procedures do not have to return a value in the program
What is recursion
A programming subroutine where a section of code calls itself until a base case is met. The base case must be chosen to avoid any possibility of an infinite loop
What are sequences
A programming control structure in which statements are executed one after another as they appear in the script
Subroutines
A uniquely named section of code that is written to perform a specific task within a program
What is backtracking
An algorithms that incrementally finds a solution by methodically trying different sequences and abandoning a path when it knows it cannot lead to a valid solution
Computable problems
A problem for which every instance can be solved in a finite number of steps by means of an algorithm
Computational methods
A method of solving a problem which by some form of computation in devising and implementing an algorithm
Data mining
An algorithms that finds a solution by analysing a large data set to uncover trends and relationships between variables
What is divide and conquer
An algorithm design technique to decompose and solve problems by reducing the problem size with each iteration until the sub problem becomes solvable
Heuristics
A rule of thumb algorithm which can produce a valid albeit sub-optimal solution for a hard (intractable) problem as an approximation
Performance modelling
The process of simulating the behaviour of a model under different virtual user and system loads by mathematical approximation
What is pipelining
The process of splitting a task into parts and then searching for subtasks that can be processed simultaneously to overlap the processing of each part
What is problem decomposition
The process of splitting a given problem into smaller, solvable sub-problems that are easier to conceive, understand, maintain and program
What is problem recognition
The ability to recognise the most effective strategy to solve a problem
What is visualisation
The use of a visual representation of an algorithms or data structure to translate a problem and it’s solution to a more human readable form
What is sequence
Code is executed line-by-line, from top to bottom
What is branching
A certain block of code is run if a specific condition is met, using IF
statements. This is also known as ‘selection’
What is iteration
A block of code is executed a certain number of times or while a condition is
met. Iteration uses FOR, WHILE or REPEAT UNTIL loops.
Iteration can be eitherT
Two types of iteration
Count controlled and condition controlled