Exam With 100% Verified Solutions |
Solved
Abstract Class CORRECT ANSWERS A class that can never be instantiated and is
used when no generic object will ever be created.
Abstract Data Types vs. Data Structures CORRECT ANSWERS An ADT is a set of
operations and a data structure is a way to organize data so that we can store and
retrieve the data in some way.
Abstraction CORRECT ANSWERS A way to separate implementation from interface.
Algorithm Analysis CORRECT ANSWERS Amount of resources needed to execute a
code, i.e. time and space.
Amortized Costs CORRECT ANSWERS Incrementing a cost every time an arrayList
becomes full in a program to avoid it becoming too full to accept anymore data.
Best Case Analysis CORRECT ANSWERS When an algorithm requires the smallest
number of steps
Average Case Analysis CORRECT ANSWERS Adding the number of steps for all the
inputs and divide by the number of inputs.
Worst Case Analysis CORRECT ANSWERS When an algorithm requires the max
number of steps
Big-O-Notation (Transitivity) CORRECT ANSWERS If f(n) is O(g(n)) and g(n) is O(h(n)),
then f(n) is O(h(n))
Big-O-Notation (Additivity) CORRECT ANSWERS If f(n) is O(h(n)) and g(n) is O(h(n))
then f(n)+g(n) is O(h(n)).
Big-O-Notation (Mult by a Constant) CORRECT ANSWERS a*n is O(n)
Big-O-Notation (Powers) CORRECT ANSWERS nk is O(nk+j) for any positive j.
Class CORRECT ANSWERS Blueprint for objects
Constructor CORRECT ANSWERS Special method with the same name as the class, is
invoked when the object is created, receives values/variables and assigns them to
instance variables and has no return type including void.