2.2.1 PROGRAMMING TECHS

12 flashcardsby Sabs2023
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
IDE STANDS FOR and purpose?
Integrated development environment - Provide range of tools to help speed up and enhance program development
2
Features of IDES:
-Syntax highlighting
-Autocompletion
-Smart indentation
-Integrated debugger
-Translators
3
Three prpgraming constructs?
Sequence
Iteration
Selection(branching)
4
Sequence?
Executing instructions one after another
5
Selection?
Allows program to change direction and follow certain instructions depending on outcome of condition
6
Iteration?
Repeating sections of code once/multiple times
7
Recursion?
When a subroutine(usually function)calls itself within its own subroutine and must contains deez characteristics:
-Contains a stopping condition
-For any input value than stopping condition, subroutine should call itself.
-Stopping condition should be reacheable within a finite number of time(s)
Without these itd call itself infinetly.
8
Example of recursion against iterative
9
Local and global variables?
Local:
-Declared inside subroutine and only accessed by THAT subroutine
-Created and destroyed when routine is called/ended.
Global:
-Declared in the main body of program outside subroutine and accessible throughout program
-Created and destroyed when program starts/ends

Global variables usage are considered poor programming practice
10
Modularity?
Concept of breaking a large program down into smaller chunks with each module carrying out a dif task
11
Ways to pass in variables to subroutines?
Pass by value: Value passed to subroutine is a copy of original and is held in dif memory location and is a local variable. SO ORIGNAL VALUE DOESNT GET MODIFIED
Pass by reference:A pointer which contains memory address of original value is created SO ORIGINAL VALUE CAN GET MODIFIED
12
When is OOP best used at?
Works best in situations where you can encapsulate and model entities as objects.
Its great for developing GUI and GAMES.
Study all 12 cards for free