Programming techniques Flashcards

1
Q

What features may be included in a IDE?

A
Code editor
Compiler/interpreter
Debugging tools
testing tools
program building
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is an IDE

A

Integrated Development envrioment

An IDE is a software program designed to help porgrammers / developers to build programs. It is made of a number of components.

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

What is recursion

A

When a function calls itself from within the function.

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

Describe one difference between local and global variables.

A

global varible throughout a program.

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

Explain why good programming practise generally avoids the use of global variables.

A

1) Global variables make it differicult to integrate modules
2) They may cause conflicts with names in other modules
3) they may be accidentaly changed if the program is complex.

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

Explain why global variables are sometimes used in a program.

A

A global variable is used where a value needs to be accessible from various parts of a program and needs to have the same value irrespective of where it is used.

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

Explain why parameter passing can be a better alternative to global variables.

A

When a parameter is passes to a function, only a copy of the data may be changed, therefore no unforeseen effects will occur in other modules.

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

What is a function

A

A function is a named section of program taht performs a specific task or it returns a value.

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

Compare a program procedure and a function.

A

A programming procesure is also a sub section of a program that performs a specific task but does no necessarily return a value.

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

What are the uses of breakpoints?

A

Used to test the program runs up to specific points

Check variable contents at specific points

Can set a point where program stops running.

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

What are the uses of stepping?

A

Can set the program to run line by line.
Can allow the programmer to slow down / Watch execution.
Can help find a point where an error occurs.

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

Name 3 programming constructs

A

selection interation, sequence.

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