Test #1 Flashcards
ADT
An abstract data type (or ADT) is a class that has a defined set of operations and values
5 characteristics of good algorithms
1) clear, concise, easy to maintain
2) come to an end (unlike shampoo algorithm)
3) use finite amount of memory
4) require no intelligence or insight to execute
5) have shortest runtime compared to others
Big-O
O(n) ; <=
Omega-O
> =
Theta-O
=
little-o
<
Pass by Value
sending a value into an argument makes a copy of that value, so the original value is not changed throughout the function
Pass by Reference
sending a value into an argument with an & makes the function modify the address of the value, therefore making changes to the original value throughout the function
struct vs class
struct variables and methods are public by default while class variables sand methods are private by default
specification vs implementation file
specification file is where class methods are defined and implementation file is where they are filled
why are all arrays pass by reference
because you can access and modify the elements in the array, and the changes will be made in the original array because you are passing the memory address
algorithm
step - by - step procedure for solving a problem or computing a task
program
set of instructions for a computer to follow to perform a task
data type
type of data a variable can hold
data structure
formats used to organize, store, and manage data