2.2.1 programming techniques Flashcards

1
Q

IDE

A

integrated development environment

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

features in IDE

A
  • auto-indent
  • auto-numbering
  • auto-suggestion
  • auto-fill
  • coloring
  • run time management
  • debugging
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

debugging in IDE

A
  • breakpoint: stop at that line
  • step through: one line at a time
  • watch: display variables
  • trace: execute code, message at each function
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

types of errors

A
  • syntax errors: wrong typing
  • logic errors: codes does not make sense
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

types of IDE

A

-compiler: displays all errors after compilation
-interpreter: displays errors one by one

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

programming constructs

A

-sequence: order of code executed
-iteration: for/while/do…until
-branching: (selection) - if else; switch case

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

recursion

A

characteristics:
- must call itself
- finite number of calls (must be reached)
- must have a base case (stopping condition)

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

global variable

A

can be used outside of subroutines

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

local variable

A

used only within subroutines

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

passing by value

A

only a copy of data is passed
changes would be lost when the function/procedure ends
must return the variable to be passed onto the main code
(mark scheme)

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

passing by reference

A

will pass out of subroutine
return value automatically

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

modularity

A

modularisation - using functions and procedures
modules- a block of code with a given name

breaking down problems into subproblems like modules

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

benefits of modularisation

A

programs are more easily and quickly written (breakdown, modules reused, library)

programs are more reliable and have fewer errors
take less time to test and debug

programs are easier to maintain

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

functions

A

subroutine that returns a value

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

procedures

A

subroutines that perform the executions

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

parameter

A

appear in subroutines as definitions

17
Q

argument

A

appear in subroutine calls

18
Q

identifier

A

names for variables and functions

19
Q

subroutines

A

set of instructions with a name

-library subroutines
-built-in subroutines (e.g. print)

20
Q

reusable components

A

-naming subroutines and variables
-commenting
-exit points
-length of subroutines

-documentation of input, output and preconditions
-documentation of what the code does, coder and date it was written

21
Q

benefits of reusable component

A

Programs are more easily and quickly written
Programs are more reliable
Programs require less time to debug and test
Programs are easier to maintain
Modules can be written by different people in a team, shortening development time
Modules can be reused in different programs