Fichas
Unit 2.2 - Programming Techniques
Fichas del conjunto (20)
- 1Variables and ConstantsVariables are inputs that are processed and output back to the user and change throughout the program whereas constants are fixed for the duration of the program; making constants capital simplifies debugging. Both are used to store data while the program is running
- 2AssignmentLabelling various inputs, constants and outputs with descriptive names; shouldn't start with a number or contain spaces. Information is stored in memory locations under descriptive names called 'identifiers'.
eg. x = y MOD - 3ConcatenationJoining inputs/text variables together.
- 4ParametersInputs come from the console, from a file or from elsewhere in a modular program.
- 5OperatorsNumbers- Addition, subtraction, division
Booleans- AND, OR, NOT
Strings/Characters- Slicing, length, format - 6SequencingAllows a programmer to solve complex tasks through a number of simple steps (the order of steps in most tasks matters)
-Each line follows the next, but hard to maintain
-Creates simple programs quickly, but not efficient
-Easy to follow (only) for a small program - 7SelectionIF-ELSE,IF-ELSE and SELECT CASE/SWITCH
Allows a computer to make decisions. Changes the flow of a program depending on a set of conditions. Used for validation, calculation and making sense of a user's choice. - 8Nested SelectionOnly evaluates a condition if preconditions are met; there is no limit on how many selection statements we can nest; the outside selection is the pre-condition and the inside is the condition.
- 9Iteration and For CounterIteration loops and runs through multiple similar items of data.
For counter used when we know in advance how many times we want to loop back so we use a counter. - 10Stepping and While LoopStepping skips/misses out whilst counting.
While loop is a conditional loop that evaluates a Boolean condition every time they run and used for evaluation and searching. - 11Nested LoopingUsed for iterating 2D arrays or generating complex sequencing
- 12Data PersistenceData is stored somewhere for future use.
Not closing the file when no longer needed wastes RAM which is known as a memory leak. - 13EOF (End of File) and Read LineEOF is a condition for the while loop to stop reading the file's lines.
Read Line reads characters in the file until it hits EOL (End of Line) delimiter- usually a LineFeed - 14Array eg. 2D ArrayAn ordered collection of related data where each element is accessible by a number, index
2D Array - Has rows and columns, a table
First index can hold data for one entity and second can hold another - 15An array up to 2D to a file1) Iterate through an array using WRITE-LINE and writing elements to the file one by one
2) Serialise the array (convert to a string) using delimiters eg. commas for columns and NewLines for rows in case of a 2D array.
2D array uses numeric index not names - 16SQL (Standard Query Language) S C U R DPopular human-readable programming language used to work with databases stored in binary proprietary formats eg. Oracle, MySQL.
Search, Create, Read, Update, Delete
SELECT FROM WHERE - 17CastingAssigning a data type to a value that's been entered; changing how a variable's data type is interpreted
- 18Primary KeyUnique entity; can't be repeated
- 19Database recordA collection of data about an entity
- 20Procedures and FunctionsCode can be reused, pre-built or external subroutines can be used and work can be split between programmers.
Procedures are called by their name and do not return values whereas
functions are called by assign their value to something
Información
- Descripción
- Fichas sobre Unit 2.2 - Programming Techniques, creado por Karolina Rawdanowicz el 24/01/2019.
- Creado por
- Karolina Rawdanowicz
- Visitas
- 5
- Valoración