Level 40 Level 42
Level 41

2.2.1 - Programming Techniques


75 words 0 ignored

Ready to learn       Ready to review

Ignore words

Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.

All None

Ignore?
algorithm
a set of rules or a sequence of steps that specify how to solve a problem
pseudocode
a simplified language for describing an algorithm, that has no specific syntax and is used in program design
comment
allows the author of code to document it and leave notes in regard to the function of the code; it does not affect the code at all
exponent
the power to which a number should be raised, usually achieved in programming in the form of x ** y
concatenation
the operation of joining two strings together, usually achieved in the form of "String One" + "String Two"
variable
identifiers that are given to memory cells that can be accessed and modified throughout the course of a program
constant
identifiers that are given to memory locations, whose value will never change when the program is being run
underscores
A variable name can usually not consist of spaces or any other characters apart from letters, numbers and ...
programming constructs
Sequence, Selection and Iteration are the three basic ...
sequence
Programming Construct: one statement following another
assignment statement
a statement in which a value is assigned to a variable
selection
Programming Construct: used to choose which statement will be executed next, depending on some condition
relational operators
operators such as > and != which can be used for making comparisons
switch statement
Examples of selection statements include the if statement and the ...
Boolean operators
Complex conditions can be formed by using ...
iteration
Programming Construct: used to repeat a number of statements (ie. creating a loop)
while ... endwhile
A loop where the expression controlling its iteration must be a Boolean value, and the expression is tested at the start of the loop
repeat ... until
A loop where the expression controlling its iteration must be a Boolean value, and the expression is tested at the end of the loop
for ... next
A loop where the number of times it should be repeated is predefined
subroutine
a named block of code which performs a specific task within a program
function
a subroutine that will return a value
procedure
a subroutine that will run but wont return a value
parameter
the values that need to be passed into a subroutine, given a name so they can be called within the subroutine
argument
the value that is passed into a parameter when a subroutine is called
by value
when the value of a variable is passed into a subroutine, meaning that any changes to its value in the subroutine wont affect its value outside of it, this is passing ...
by reference
when the memory location of a variable is passed into a subroutine, meaning any changes to the variable in the subroutine will affect its value in the main program, this is passing ...
global variable
a variable that can be accessed and used anywhere within the program
local variable
a variable that can only be accessed in the part of the program it was declared in
self-contained
Using local variables within subroutines is useful as it makes sure each subroutine is completely ...
independently
Subroutines using methods of encapsulation are advantaged as they can be reused in different programs and can be tested ...
working
As subroutines can be tested independently, the time is shortened to get a large program ...
debug
Subroutines are small sections of code so are easier to understand, maintain and ...
sooner
Using subroutines for a large project allows the workload to easily be shared, allowing the program to be finished ...
control
Subroutines allow large projects to be easier to monitor and ...
recursion
when a subroutine calls itself a finite number of times until the base case is reached
base case
a stopping condition that will stop a recursive subroutine from calling itself and allow it to 'unwind'
stack overflow error
If a subroutine calls itself too many times before the base case is reached, the program can crash with a ...
recursion finishes
Each call to a recursive function causes new copies of the local variables to be created, so that each call gets its own memory which lasts until the ...
call stack
a stack that keeps track of the address of the instruction the control should return to when a subroutine ends
stack frame
For each call to a recursive function, the return address, parameters and local variables in the subroutine are held in a ... in the call stack
memory space
Recursive functions are often much shorter than iterative ones, saving ...
trace
Compared to iterative functions, recursive ones are more difficult to ...
be called
Unlike iterative functions, recursive functions have a limit to the number of times they can ...
integrated development environment
a software application that provides comprehensive facilities, enabling programmers to write code more easily
easy reference
An IDE allows a programmer to create, write, save and edit programs, as well as adding line numbers for ...
breakpoint
this can be set in a program in an IDE, causing the program to stop at that line when it is being run (ie. to see whether it even reaches the line)
watch
this can be set on a variable in an IDE, so that its value is displayed each time it changes
step through
the programmer can ... a program line by line in an IDE to see what is happening
error diagnostics
When there is an error in a program, an IDE will often display the syntax errors along with where they occur, this is ...
normal data
test data that has a value within the expected range and of the expected data type
boundary data
test data that has a value at the end of the expected range but of the expected data type
erroneous data
test data that has a value just outside of the expected range or of the wrong data type
dry-run
when a trace table is used to trace the program in order to help locate an error
procedural language
a programming language which has built in data types and will typically include some data structures (like arrays and records, while others such as stacks will have to be programmed); they specify a series of structured steps to complete the task
primitive
In procedural programming, data is held in separate ... variables and data structures
object-oriented programming
a programming paradigm that splits code into objects which possess states and behaviour, abstracts details of implementation from the user, and makes code reusable and easy to maintain
attributes
variables that an object stores data in, which describes the object
behaviours
the functions and subroutines defined within an object class, which describe the actions an object can make
class
a blueprint for an object which defines the attributes and behaviours of an object
public
In general, instance variables are declared as private in a class and most methods are made ...
constructor
a method in a class in OOP with the name new, which creates a new object when called
instantiation
the creation of a new object from a class
object
an instance of a class
reference variable
used to interact with an object but doesn't hold the object, but rather a pointer to where the object is stored
getter
a function defined in a class that returns the value of individual attributes
setter
a procedure defined in a class that changes the state of an object
encapsulation
when the methods that are applied to a data structure, are kept with the data, in such a way that the attributes and methods of one object cannot affect another and it hides the details of implementation from the user
how they work
Encapsulation enables different programmers to work on different classes without needing to worry about other parts of the system affecting their code and lets them use methods from classes without knowing ...
information hiding
the details of an object's instance variables are hidden so that getters and setters must be used to interact with an object's state
inheritance
the idea in OOP that a class can acquire the methods and attributes of other classes
subclass
a class that inherits from a superclass (OOP)
superclass
a class that another class inherits from (OOP)
polymorphism
the idea in OOP that objects can behave differently in different contexts due to overriding and overloading
overriding
the idea in OOP of writing a different version of a method that a class inherited but using the same name and formal argument types
overloading
the idea in OOP of having different versions of a method with the same name due to having different signatures (parameters)