2.3 Robust Programs Flashcards

1
Q

What are the 2 main types of error

A
  • syntax error
  • logic error
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a syntax error

A

An error where there is a problem with the code (such a spelling mistake) so the program does not run

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

What is a logic error

A

The program works, but not as intended

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

What is a runtime error

A

When the program crashes despite there appears to be nothing wrong with the code

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

What are the 4 types of test data

A
  • Normal
  • Boundary
  • invalid
  • erroneous
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is normal data

A

Data that is correct

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

What is boundary data

A

The min/max value that could be entered

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

What is invalid data

A

Values higher than the expected range

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

What is erroneous data

A

Incorrect values that the program should not accept (e.g. “Dave” in an age field)

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

What are the 2 types of testing

A
  • iterative testing
  • final testing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is iterative testing

A

Testing the code as you create it

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

What is final/terminal testing

A

Testing carried out at the end of the program when it is complete

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

What is refining an algorithm

A

Making it more robust

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

What is the job of a comment in a program

A
  • inform the reader of bugs or issues
  • explain the code and it’s function
  • to stop a line of section of code to stop running
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What 2 factors help a program be more maintainable

A

Comments
Naming conventions

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

What is input validation

A

A check made by a computer to ensure data is reasonable

17
Q

What is authentication

A

Checking that a user is who they say they are and that they are allowed to access the program