Programming techniques Flashcards
What features may be included in a IDE?
Code editor Compiler/interpreter Debugging tools testing tools program building
What is an IDE
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.
What is recursion
When a function calls itself from within the function.
Describe one difference between local and global variables.
global varible throughout a program.
Explain why good programming practise generally avoids the use of global variables.
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.
Explain why global variables are sometimes used in a program.
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.
Explain why parameter passing can be a better alternative to global variables.
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.
What is a function
A function is a named section of program taht performs a specific task or it returns a value.
Compare a program procedure and a function.
A programming procesure is also a sub section of a program that performs a specific task but does no necessarily return a value.
What are the uses of breakpoints?
Used to test the program runs up to specific points
Check variable contents at specific points
Can set a point where program stops running.
What are the uses of stepping?
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.
Name 3 programming constructs
selection interation, sequence.