In this unit students will demonstrate an understanding of and appropriate use of variables, constants, operators, inputs, outputs and assignment. Students will be able to recognise and use the common arithmetic, comparison and Booleans operators AND, OR and NOT. Students will be able to identify and apply the three basic programming constructs used to control the flow of a program: sequence, selection and iteration (count and condition controlled loops. Students will be able to choose suitable data types for data in a given scenario and understand that data types may be temporarily changed through casting. The unit ends with consideration of further programming techniques including string manipulation, file I/O, SQL, random number generation, the use of sub programs (functions and procedures) and both one-dimensional and two dimensional arrays.
A value that can change depending on conditions or information passed to the program.
A value that cannot be altered by the program during normal execution.
Tells a program how to manipulate or interpret values. Categories of operators you need to know about are arithmetic, Boolean and comparison.
Giving a variable or constant a value (e.g., counter = 0).
Lines/blocks of code that perform a certain function. The three basic programming constructs are sequence, selection and iteration.
One of the three basic programming constructs. Instructions that are carried one after the other in order.
One of the three basic programming constructs. Instructions that can evaluate a Boolean expression and branch off to one or more alternative paths.
An iteration that loops a fixed number of times. A count is kept in a variable called an index or counter. When the index reaches a certain value (the loop bound) the loop will end. Count-controlled repetition is often called definite repetition because the number of repetitions is known before the loop begins executing.
A way for computer programs to repeat one or more steps depending on conditions set either a) initially by the programmer or b) by the program during execution.
+ - / * ^ Used in mathematical expressions (e.g., num1 + num2 = sum).
A logical operator used within a program. Only returns TRUE if both values being compared are TRUE.
A logical operator used within a program. Returns TRUE as long as either value being compared is TRUE.
A logical operator used within a program. Returns FALSE if the input is TRUE and returns TRUE if the input is FALSE.
Not equal to.
Less than or equal to.
Greater than or equal to.
Integer division. MOD outputs the remainder left over after division e.g., 10 MOD 3 = 1.
Integer division: DIV outputs the number of times a number fits into another number e.g., 10 DIV 3 = 3.
The basic data types provided as building blocks by a programming language. Most languages allow for more complicated, composite types to be constructed from basic types recursively e.g., char, integer, float, Boolean. As an extension, a string data type is constructed behind the scenes of many char data types.
A data type used to store positive and negative whole numbers.
A data type used to store an approximation of a real number in a way that can support a trade-off between range and precision. Typically, a number is represented approximately to a fixed number of significant digits and scaled using an exponent.
Used to store logical conditions e.g., TRUE/FALSE, ON/OFF, YES/NO, etc.
A single alphanumeric symbol.
A sequence of alphanumeric characters and/or symbols e.g., a word or sentence.
Converting a variable from one data type to another. For example, a variable entered as a string needs to be an integer for calculation age = INPUT(Enter your age: ) age = INT(age).
Commands and techniques that allow you to alter and extract information from textual strings e.g., .length .substring(x, i) .left(i) .right(i) .upper .lower ASC( ) CHR( ).
File handling is the process of dealing with input to and from files. Files first have to be opened, creating a handle to the file and allowing reading and writing.
Once a file has been opened, it is possible to use commands to read its contents and return them to a program.
Once a file has be opened it is possible to use commands to write data to the file from a program.
When a file is no longer in use, closing it releases the file handle and breaks the connection between the file and a program.
A data structure consisting of a collection of elements, typically in fixed number and sequence and indexed by name. Elements of records may be called fields. The record is a data type that describes such values and variables. Most modern languages allow programmers to define new record types, as well as specifying the data type of each field and an identifier by which it can be accessed.
The language and syntax used to write and run database queries.
A SQL keyword used query (retrieve) data.
SELECT Name, Age, Class
WHERE Gender = Male
A SQL keyword used to signify which table(s) are included in a query.
SELECT Name, Age, Class
WHERE Gender = Male
A SQL keyword used to filter query results.
SELECT Name, Age, Class
WHERE Gender = Male
A set of data items of the same type grouped together using a single identifier. Each item is addressed by its variable name and a subscript.
A block of code given a unique identifiable name within a program. Supports code reuse and good programming technique.
A block of code within a program that is given a unique, identifiable name. Can take upwards of zero parameters when it is called. Should be designed and written to perform a task or action that is clearly indicated by its name.
A block of code within a program that is given a unique identifiable name. Can take upwards of zero parameters when it is called and should return a value. Should be designed and written to perform a task or action that is clearly indicated by its name.
Most programming languages have built-in functions or libraries that allow you to easily generate random numbers. Creating truly random numbers is actually rather difficult for a computer, and these algorithms are quite complex.
In this unit students will learn what an algorithm is and be able to create algorithms to solve specific problems using sequence, selection and iteration. Students will learn how to express algorithms using flow diagrams and pseudocode, using suitable variables and arithmetic, relational and Boolean operators. They will also be able to analyse, assess and compare different algorithms for given scenarios
The thought processes behind formulating a problem and expressing its solution(s) so that a human or machine can effectively carry it out.
The process of separating ideas from specific instances of those ideas at work. Computational structures are defined by their meanings while hiding away the details of how they work. Abstraction tries to factor out details from a common pattern so programmers can work close to the level of human thought, leaving out details that matter in practice but are immaterial to the problem being solved.
The process by which a complex problem or system is broken down into parts that are easier to conceive, understand, program and maintain.
A way of getting to a solution by identifying the steps required.
Any information or data that is fed into a system.
Anything that happens to data while a system is running e.g., calculations.
Any information or data that leaves a system.
A diagram that looks like an upside-down tree with one node at the top (root) and many below. Used when designing solutions to problems to help break a large problem down into a number of smaller parts.
A language-independent description of the steps of an algorithm. Intended for humans to express and design algorithms before coding.
A method of designing algorithms using symbols before coding.
A technique used to test algorithms and ensure that no logical errors occur while the algorithm is being processed. The table usually has a column for each variable. Each row shows how the various values change as the algorithm runs.
An algorithm that attempts to find a specific value in a data set.
Efficient search method that only works if a files records are arranged in sequence. Involves accessing the middle record in the file, determining whether the target record has been found and, if not, whether the target record is before or after the mid-point. The process is repeated on the part of the file where the target record is expected to be until it is found.
Examining each entry in a file in turn until the target record is found or the end of the file is reached. Unless the file is arranged in a useful order, a serial search must be used.
An algorithm that attempts to sort an unordered set of values.
Simple and popular with inexperienced programmers but inefficient for sorting large amounts of data, as the length of time it takes to execute correlates to the square of the number of items e.g., if a list of 10 items takes 1ms to sort, 100 items will take 100ms.
Divide-and-conquer algorithm created by John von Neumann. First, the list is divided into the smallest unit, known as an element. Each element is compared with the adjacent list with a view to sorting the records and merging the two lists back together.
A simple sorting algorithm that builds the final sorted array/list one item at a time. Less efficient with large lists than advanced algorithms like quicksort, heapsort or merge sort.
In this unit students will be introduced to the issues a programer should consider to ensure that a program caters for all likely input values and how to deal with invalid data entry through input validation and authentication techniques. Students will be able to identify the purpose the difference between iterative and final/terminal testing as well as creating a suitable test plan using suitable test data (normal, boundary, invalid/erroneous).
The practice of planning for contingencies in the design stage of a project.
Considering how an end user might accidentally or deliberately break a program and writing additional code to handle these situations.
Verifying a users identity before they can use a system. Strong passwords over a certain length with symbols and mixed-case letters are advised.
Ensuring data input by a user meets specific criteria before processing. Range check (e.g., 1 31); type check (e.g., a number, not a symbol); presence check (e.g., data has been input); format check (e.g., a postcode is written LLN(N) NLL).
Techniques and methods that make code easier to debug, update and maintain.
Many programmers use defined naming conventions for variables, contents and procedures. Camel case is a popular one used in the industry where the first word of an identifier uses all lower case and all subsequent words start with a capital letter e.g., studentsFirstName.
Makes it easier to see where structures begin and end. Conditions, iterations and code inside procedures and functions should be indented.
Used to explains sections of code. Ignored by the compiler.
Assessing the performance and functionality of a program under various conditions to make sure it works. Programmers need to consider all the devices the program could be used on and what might cause it to crash.
Each module of a program is tested as it is developed.
Checking that all the modules of a program work together as expected and the program meets the expectations of users with real data.
Rules of the language have been broken, so the program will not run. Variables not being declared before use. Incompatible variable types (e.g., sum = A); using assignments incorrectly (e.g., 2 + 2 = x); keywords misspelt (e.g., PRNT(Hello)).
The program runs but does not give the expected output. Division by zero. Infinite loop. Memory full. File not found.
Values used to test a program normal, boundary and erroneous.
Data supplied to a program that is expected. Using a program written to average student test scores as an example, if allowed scores are 0 100, normal test data would include all the numbers within that range.
Data supplied to a program designed to test the boundaries of a problem. Using a program written to average student test scores as an example, if allowed scores are 0 100, boundary test data could be -1, 0, 1, 99, 100 and 101.
Data of the correct type but outside accepted validation limits. Using a program written to average student test scores as an example, if allowed scores are 0 100, invalid test data could be -5, 150, etc.
Data of the incorrect type that should be rejected. Using a program written to average student test scores as an example, if allowed scores are 0 100, erroneous data might be the string hello, the real number 3.725, etc.
In this topic, students will learn about a form of algebra called Boolean logic where all values are either True of False. These values are then used to test the conditions that selection and iteration are based around. Students will learn the binary logic of logic gate (AND, OR, NOT) and transistors in a computer systems and learn how to use algebra and truth tables to describe logical expressions.
A method of expression Boolean logic in a diagram using a set of standard symbols that represent the various logic gates AND, NOT, OR, NAND, etc.
A symbol in a logic diagram that represents a single gate e.g., AND, OR, NOT.
Accepts two inputs and produces one output. Both inputs must be TRUE (1) for the output to be TRUE (1) otherwise, the output will be FALSE (0).
Accepts two inputs and produces one output. At least one input must be TRUE (1) for the output to be TRUE (1) otherwise, the output will be FALSE (0).
Accepts one input and produces one output. If the input is TRUE (1), the output will be FALSE (0). If the input is FALSE (0), the output will be TRUE (1).
A notation used in Boolean algebra to define the output of a logic gate or logic circuit for all possible combinations of inputs.
In this unit students will learn about the characteristics and purpose of both high and low level languages. Students will learn about the purpose of translators and the differents, benefits and drawback of using a compiler or an interpreter. This uit will also cover the tools and facilities available in an Integrated Development Environment (IDE) including editors, error diagnostics, run-time environment and translators and how each can be used to help a programmer develop a program.
Designed to allow the expression of a computer program in a way that reflects the problem being solved rather than the details of how the solution is produced. One-to-many.
Close to machine code and closely related to the design of the machine. One-to-one.
Takes a program written in one programming language and converts it to another.
Translates high-level language source code into a computers machine code.
Translates and executes a program one statement at a time.
Integrated Develop Environment: A software application that provides comprehensive facilities for software development. Normally consists of a source code editor, build automation tools and a debugger.
IDE tools that provide detailed feedback on errors in code.
A configuration of hardware and software. Includes the CPU type, operating system and any runtime engines or system software required by a particular category of application.
Revision for GCSE exams.