Name the three programming constructs
What is sequence?
Sequence is the order in which instructions occur and are proccessed
What does selection do?
Selection determines which path the program takes
What is iteration?
iteration is the repeated excecution of a section of code when a program is running
Which two categories of loop are iteration split up into?
What is recursion?
Where a subroutine call itself during excecution until the stopping condtion is met
State two advantages of recusion
State two disadvatages of recursion
Define scope
The section of the program in which a variable is accessible
Give two advantages of using local variables over global variables
What is the difference between a procedure and a function?
Functions must always return a single value, while procedures do not always need to return a value
What does it mean to pass in a parameter (to a subroutine) by reference?
The address in memory of the parameter is passed to the subroutine so the value outside the subroutine will be updated
The value in the parameter is changed
What does it mean to pass in a parameter (to a subroutine) by value?
The value stored inside memory location is passed into the function
The variable outside the function does not change
What are IDE’s?
Integrated development environment is a software application that provides a comprehensive set of tools. They are useful tools for software developers
What does IDE stand for?
Integrated Development enviornment
State two features of IDEs
What is encapsulations in OOP?
When attributes and methods are declared as private so they can only be accessed by setters and getters
What is the purpose of encapsulation in OOP?
Program complexity is reduced by protecting data from being accidentally editied from other parts of the program
What is Inheritance in OOP?
Inheritance is when a child class inherits its methods and attributes from the parent class
What is polymorphism?
When two mehods in two different classes share the same name and purpose
What is it meant by a computable problem?
A problem that can be solved using an algorithm
Give three limiting factors of computable problems
Describe how divide and conquer techniques work
The problem size is halfed with each iteration. Each individual subroutine is solved recursively. Then they are recombined
Give two applications of divide and conquer