Paper 2 Flashcards

1
Q

What types of test data is there

A

Erroneous data - data which should be rejected

invalid data - data of the correct type but outside accepted validation limits

No data - no data entered

Normal data - Data should be accepted without causing errors

Boundary data - data is correct type that is on either edge of accepted validated data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is final/terminal testing

A

-Testing once the program is finished

-Testing all the modules work together

-Testing is user friendly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is iterative testing

A

Testing as the program is being written

Checks new modules so they do not introduce errors into existing code

Tests to ensure the program handles erroneous data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the purpose of testing

A

-No bugs in the code

-Acceptable performance and usability

-Program meets requirements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can a code be maintained

A

-Use of functions, reduce duplicate code

-Meaningful variable names

-Comments to explain complex code

-Use of white space

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a logic error

A

Program runs but not how you want, does not produce the expected output

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a syntax error

A

Where the code is written incorrectly, missed a () and will not run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the types of checks

A

type check - checks if its the correct data type

range check - checks if input is within range

presence check - has all the data been entered

format check - is the data in the correct format

length check - appropriate length e.g. national insurance number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what do IDE’s do

A

Highlights syntax errors

automatic indentations

executes and runs code

identifies functions

change font and colour

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is an IDE

A

Integrated development environments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Advantages and disadvantages of interpreters

A

Advantages
-Easy to write source code
-Easier to try out commands
-More detailed error messages

Disadvantages
-Slower to execute
-Code is not optimised
-Source code must be available

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is concatenation

A

Joining two strings together

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Advantages and disadvantages of compilers

A

Advantages
-Faster to execute
-Source code can be kept secret
-Code is usually optimised

Disadvantages
-Code needs to be recompiled after any changes
-Designed for a specific type of processor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What do translators do

A

Translates programming language into machine code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Why might high level language not be executed as quick

A

It is dependent on clock speed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does a compiler translator do

A

Takes all the code, translates it and executes it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is an interprer translator

A

Translates a line at a time and executes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is assembly language

A

Low level programming language that uses mnemonics to represent machine code instructions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What are characteristics of low level language

A

Assembly is translated by a assembler

Machine code is executable binary code

Difficult to understand

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is an example of low level language

A

Assembly language

machine code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What are characteristics of high level programming language

A

Translated using a compiler or interpreter

Quicker to type

Close to written english

Easy to understand

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What are examples of a high level language

A

Python, Java

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is an array

A

An array is a group of data items of the same data type which is stored under one identifier in contiguous memory locations

24
Q

What is an input validation

A

Checking that the data inputed by the user meets specific criteria before processing

e.g. checking an email is real by seeing if it has an @

e.g. checking if the DOB is in the correct format

25
Q

OR gate truth table

A

10 = 1
11 = 1
01 = 1
00 = 0

26
Q

AND gate truth table

A

10 = 0
11 = 1
01 = 0
00 = 0

27
Q

NOT gate truth table

A

1 = 0
0 = 1

28
Q

How do you use SQL

A

SELECT
FROM
WHERE

29
Q

Advantages of using subroutines

A

-Breaks down or decomposing a large problem into sub tasks

-each subroutine can be tested separately

-Subroutines can be used several times through the program

-Subroutines can be stored in a subroutine library and used in different programs

30
Q

Why are subroutines used

A

-Breaks code down into smaller problems

-Speeds up coding time

-Simplifies testing

-Reduces lines of code

31
Q

What are the two types of subroutines

A

Functions
Procedures

32
Q

What is the difference between a function and a procedure

A

A function returns a value, have to return it at the end

33
Q

What is casting

A

Changing the type of variable value from one to another

int() float() str()

34
Q

What is MOD

A

MOD gives the remainder of integer division

13 MOD 3 = 1

35
Q

What is DIV

A

It is integer division

13 DIV 3 = 4

36
Q

What is a constant

A

A variable which stays the same
e.g. pie

37
Q

What is a boolean

A

truth or false

38
Q

What is a string

A

zero or plus characters

39
Q

What is a character

A

A single character, letter, digit, punctuation

40
Q

What is a real or a float

A

A decimal

41
Q

What is an integer

A

A whole number

42
Q

While loops

A

condition controlled

43
Q

for loop

A

count controlled

44
Q

What is iteration

A

Using loops:

For loops
While loops
repeat or do loops

45
Q

What is selection

A

Using if statements:

-if..then…else statements
-if…then statements
-if…else statements

46
Q

What is sequence

A

Matter of writing down the steps in the order they need to happen

47
Q

What is a merge sort

A

-A two stage sort

-First stage list is divided into half, continously until the sublists length is one

-The second stage each pair of sublists is repeatedly merged to produce sublists, until their is only one remaining

48
Q

What is an insertion sort

A

-Sorts one data item at a time

-Algorithm takes one data item from the list and places it in the correct location in the list

-This process is repeated till their is no more unsorted data items

-More efficient than the bubble sort not as efficient as the merge sort

49
Q

What is bubble sort

A

-Repeatedly going through the list to be sorted

-Compared each pair of adjecent elements

-If the elements are in the wrong order they are switched

50
Q

What are three types of algorithms for sorting data

A

-Bubble sort

-Insertion sort

-Merge sort

51
Q

What is binary search

A

-For sorted data

-Repeatedly divides the portion of the data which could contain the required item in half

-Splits it in half and sees if the data number is bigger or smaller than the required number and gets rid of half the data accordingly

52
Q

What is linear search

A

-For unsorted data

-Starts from the beginning and looks at every item until you find the one you want

-could be quick or take a long time

53
Q

What are two search algorithms

A

Linear search

Binary search

54
Q

What is algorithmic thinking

A

The series of steps the program has to perform to solve the problem

55
Q

What is decomposition

A

Breaking down a problem into smaller, simplier steps

-makes problems easier to solve

56
Q

What is abstraction

A

removing unnecessary detail from a problem in order to solve it