design, testing and IDEs Flashcards

1
Q

what do structure diagrams do

A

show the smaller tasks of a larger program

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

how are structure diagrams made

A

by decomposing the program into manageable modules, this modules are then further broken down and eventually into modules that perform individual tasks

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

what are the advantages of using structure diagrams

A
  • coding is easier because you’re only writing the code for simple tasks
  • lots of programmers can work on one program
  • easier to test your program as each module can be tested individually
  • individual sub programs can be fixed and updated without affecting the rest of the program
  • you can reuse sub programs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

how can you make sure a program is well-maintained

A
  • comments explaining what key features of the program do
  • indentations to separate different parts of the program
  • variables, subprograms and parameters should be named
  • using sub programs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what should programmers look out for in defensive design

A
  • anticipate how users might misuse their program
  • ensure their code in well maintained
  • reduce the number of errors in the code through testing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is input validation

A

checking if data meets certain criteria before passing it into the program

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

what are some of the different types of input validations checks

A
  • range check = checks the data is within a specified range
  • presence check = checks the data has actually been entered
  • format check - checks the data has the correct format
  • look-up table = checks the data against a table of acceptable values
  • length check = checks the data is the correct length
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is a common way programs use authentication

A

passwords

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

what is a syntax error

A

doesn’t follow the rules or grammar of the programming language

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

what is a logic error

A

able to run the program but the program does something unexpected

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

what are the two types of testing

A

iterative testing = program is tested while it is being written
terminal testing = program is tested at the end

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

what are the two types of testing

A

iterative testing = program is tested while it is being written
terminal testing = program is tested at the end

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

what is the advantage of iterative testing

A

used to identify and fix small errors which help prevent larger errors from occurring later on

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

what is the advantage of terminal testing

A

modules may work perfectly on their own, but errors may occur when the modules interact which each other

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

what are the 4 different test datas

A
  • normal data = things the user is likely to input into the program
  • boundary/extreme data = values at the limit of wha the program should be able to handle
  • invalid data = inputs with a correct data type that should be rejected
  • erroneous data = inputs with the incorrect data type and should be rejected
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what are high-level languages

A

easy for humans to write but computers need to translate it before they can read and run it

17
Q

what are low level languages

A

tricky for humans to read and write but are easier for computers to run
- machine code
- assembly code

18
Q

what do compliers do

A

translate high-level code directly into machine code and create and executable file

19
Q

what do interpreters do

A

take each instruction in the code and call machine code subroutines within their own code to carry out that instruction

20
Q

what are the characteristics of compliers

A
  • translate all the source code at the same time
  • only needed once to create an executable file
  • returns a list of errors for the entire program
  • compiling can take a long time
21
Q

what are the characteristics of interpreters

A
  • translates and runs one instruction at a time and doesn’t create and executable file
  • needed every time you run a program
  • returns the first error it finds and then stops
  • programs run more slowly
22
Q

what are IDEs

A

Integrated Development Environments
a piece of software that provides features to help a programmer to develop their program

23
Q

what are some features of IDEs

A
  • code editor
  • run-time environment
  • explorer window
  • output window
  • error diagnostics and debugging tools
  • breakpoints
24
Q

what does the run-time environment do

A

allows the code to be run quickly within the IDE (start or run button)