Programming Flashcards

1
Q

Algorithm

A

A series of instructions / sequence of steps designed to perform a particular task or solve a problem

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

Types of conditional statement

A
  1. IF… THEN… ELSE… ENDIF

2. CASE… OF… OTHERWISE… ENDCASE

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

Types of loop structure & their description

A
  1. FOR… TO… NEXT
    - a set number of iterations
  2. WHILE… DO… ENDWHILE
    - used where the loop may never be executed
    - whilst a specific condition exists
  3. REPEAT… UNTIL
    - always executed
    - condition tested at end
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Types of test data & reason for use

A
  1. Normal data
    - Acceptable data to test that the results are as expected
  2. Abnormal data
    - Data that should be rejected and produce an error message
  3. Extreme data / Boundary data
    - Data to test the validation that is just within the limits of acceptability
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Difference between a variable and a constant in a program

A

A variable is used to store data that can change during the running of a program.
A constant is used to store data that will not be changed during the running of a program.

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

7 types of validation checks

A
  1. Range check
  2. Length check
  3. Type check
  4. Character check
  5. Format check
  6. Presence check
  7. Check digit
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

4 types of verification checks

A
  1. Double entry
  2. Screen/visual check
  3. Parity check
  4. Checksum
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Use of variable ‘Counter’

A

To use as a loop counter when entering … (eg. the temperatures)

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

Comment on the efficiency of your design for Task 3.

A
  1. Only checks necessary conditions

2. Uses results from Task 2

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

Reason for use of data structure ‘Array’

A
  1. To simplify programming
  2. To make programs shorter
    * If using ‘several arrays’, index can be used to identify the same __ (eg. member) across the arrays
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Describe the data type Char.

A

A single character (from the keyboard)

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

Describe the data type String.

A

An (ordered) sequence of characters

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

Describe the data type Boolean.

A

A data type with two possible values

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

Describe the purpose of a conditional statement.

A
  • to allow different routes through a program

- dependent on meeting certain criteria

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

Validation

A
  • automated checking
  • checking that data is reasonable
  • checking that data meets certain criteria
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Verification

A
  • checking that data has not changed…
  • … during input to a computer
  • … during transfer between computer/devices
  • check that data input is the same as the data that was intended to be input
17
Q

Explain what is meant by the term library routine.

A
  • Library routine is a set of instructions
  • …that is used often…
  • …which is given a name
  • …and which can be called from other programs
  • Library routines make writing programs easier and faster as the code is already written
  • Library routines make program testing easier as the code has already been tested and debugged