Programming Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is a variable?

A

Component that allows us to store data

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

What are the data types, and what do they store?

5

A
  • String: Stores texts and numbers
  • Char: Stores single characters
  • Integer: Stores negative & positive whole numbers
  • Single/Real: Stores negative & positive decimal numbers
  • Boolean: Stores either true or false
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an input?

A

Data that is put into the program

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

What is a process?

A

A calculation or evaluation within the program

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

What is an output?

A

Data that is displayed to the user

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

What is the purpose of a logical operator?

A

To join two or more conditions together to make a complex condition

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

What are the logical operators and their functions?

A
  • AND: Both conditions must be true for the complex condition to be evaluated as true
  • OR: Either condition must be true for the complex condition to be evaluated as true
  • NOT: Inverts a true to a false and a false to a true
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is iteration?

A

When a section of code is executed several times, which makes the program more efficient and error free.

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

What are the two types of iteration?

A

Fixed loop & Conditional Loop

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

What are the two types of conditional loops and their functions?

A
  • Do while: used when there is a condition that is true
  • Do until: used when we start with the code that repeats
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the 6 stages of development?

A
  • Analysis
  • Design
  • Implementation
  • Testing
  • Documentation
  • Evaluation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Stages of Development

What is the iterative process?

A

When a process is repeated, such as revisiting an earlier stage when encountering a problem

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

Stage 1:

Describe the analysis stage

A

During the analysis stage, you create a document called the software specification, which lists all the functional requirements of the program (inputs, processes and outputs)

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

Stage 2:

Describe the design stage

A

During the design stage, one of three design methods is used as well as the user interface being designed so that it is comfortable to use. Program should be designed efficiently.

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

What are the three design techniques used and their features?

A
  • Psuedocode: human readable design method used to write out inputs, processes, outputs and refinements before they are coded
  • Structure diagram: graphical design method describing the steps of a program, read top to bottom and left to right
  • Flow chart: graphical design method describing the steps of a program, read from top to bottom
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Stage 3:

Describe the implementation stage

A

During the implementation stage, the design is translated into code and written in the appropriate programming language

17
Q

Stage 4:

Describe the testing stage

A

During the testing stage, the program is tested whilst it is being written and after. A set of test data is used and put into a recorded table.

18
Q

Stage 5:

Describe the documentation stage

A

During the documentation stage, a record is kept of important information about the program including:
* Software specification
* Design notation
* Listing of all code
* Test table

19
Q

Stage 6:

Describe the evaluation stage

A

During the evaluation stage, we make sure that the code is efficient and useable

20
Q

What is an array?

A

A data structure which allows multiple pieces of data to be stored in an index

21
Q

What is string concatenation?

A

When two or more strings are added together - can be done with + or & symbols

22
Q

What is a predefined function?

A

A piece of reusable code that performs a function that has already been defined

23
Q

What are the predefined functions and their purposes?

A
  • Random: selects a random number between two numbers selected by the programmer
  • Round: will round a number up or down depending on it’s decimal place / numbers.
  • Length: will return the number of characters in a string or how many items are being stored in an array
24
Q

What is a standard algorithm?

A

A solution to common problems in programming

25
Q

What are the standard algorithms and their functions?

A
  • Input validation: used to check that input is valid and won’t break the program, makes it robust
  • Running total: used to continually add numbers to a total variable in a loop
  • Traversing an array: used to travel through an array and access the data in each index to carry out a process
26
Q

What are test tables?

A

Used to record test data, expected results and the actual results

27
Q

What are the three types of data used in test tables and their definitions?

A
  • Normal: within limits of program
  • Extreme: on the edge of the limits
  • Exceptional: data not within the limits or wrong data type
28
Q

What are the three types of errors and their definition?

A
  • Logic: error in a condition, program will still run but may return an unexpected output
  • Execution: where the program does not work due to an issue such as trying to divide by 0 or a missing file
  • Syntax: usually a spelling error or grammar mistake
29
Q

What is evaluated in a program?

A
  • Fit for purpose
  • Efficient use of coding constructs
  • Robustness
  • Readability
30
Q

What is meant by fit for purpose?

A

Does the code meet the requirements set out in the analysis stage, and if not why?

31
Q

What is meant by efficient use of coding constructs?

A

Have loops, if statements and arrays been used if applicable?

32
Q

What is meant by robustness?

A

Can the program handle incorrect data input, and does it make use of input validation?

33
Q

What is meant by readability?

A

In order for code to be readable it should include:
* Internal comments
* Meaningful identifiers
* Indentation
* White space