CMPT 280 NEW EXAM WITH COMPLETE SOLUTIONS 100% VERIFIED
List - Answer An ADT with a linear ordering that manages a collection of data
What are the two main approaches to implementing a linear data structure? - Answer
Linked List (node chain) or Arrayed List (array)
Regression Testing - Answer Testing of a previously tested program following
modification to ensure that defects have not been introduced or uncovered in
unchanged areas of the software, as a result of the changes made. It is performed when
the software or its environment is changed
A good regression test... - Answer Tests thoroughly, is easy to run, and is easily
expanded.
Black-box Testing - Answer A testing method where you identify the expected inputs and
outputs without looking at the code
White-box Testing - Answer A testing method where you create test cases directly
based on the code being tested
What are the five possible cases regarding exceptions? - Answer 1. An exception is
expected, and it occurs.
2. An exception is expected, and no exception occurs.
3. An exception is expected, and a different exception occurs.
4. An exception is not expected, but an exception occurs.
5. An exception is not expected, and none occurs.
How do you measure efficiency? - Answer Efficiency of an algorithm can be measured
, for any resource that the algorithm consumes.
The most commonly measured resource is time.
Time Complexity - Answer The amount of time taken by an algorithm to run; commonly
expressed using big-O notation
Statement Counting - Answer A very basic form of grading algorithms where you try to
determine the exact number of statements executed to perform a task. This assumes
that each line of code takes the same amount of time to execute
Active Operation Approach - Answer Counts time by identifying one statement in the
algorithm that executes at least as often as any other, and is "central" to the algorithm;
this statement is called the active operation. Once we have selected the active
operation, we then determine the exact number of times the active operation executes
and this is our T(n) for the algorithm.
Big-Oh Notation - Answer A method of classifying the time complexity of an algorithm by
providing the upper bounds of the function
Big-Theta Notation - Answer A method of classifying the time complexity of an algorithm
by providing both the upper and lower bounds of the function. Big-Theta is a stronger
statement than Big-Oh or Big-Omega individually.
Big-Omega Notation - Answer A method of classifying the time complexity of an
algorithm by providing lower bounds of the function
Collection - Answer A data structure that is comprised of a set of data elements in some
conceptual arrangement (e.g. in a linear order in the case of a list)
Iteration - Answer A process of repeating a set of instructions a specified number of
times or until a condition is met
List - Answer An ADT with a linear ordering that manages a collection of data
What are the two main approaches to implementing a linear data structure? - Answer
Linked List (node chain) or Arrayed List (array)
Regression Testing - Answer Testing of a previously tested program following
modification to ensure that defects have not been introduced or uncovered in
unchanged areas of the software, as a result of the changes made. It is performed when
the software or its environment is changed
A good regression test... - Answer Tests thoroughly, is easy to run, and is easily
expanded.
Black-box Testing - Answer A testing method where you identify the expected inputs and
outputs without looking at the code
White-box Testing - Answer A testing method where you create test cases directly
based on the code being tested
What are the five possible cases regarding exceptions? - Answer 1. An exception is
expected, and it occurs.
2. An exception is expected, and no exception occurs.
3. An exception is expected, and a different exception occurs.
4. An exception is not expected, but an exception occurs.
5. An exception is not expected, and none occurs.
How do you measure efficiency? - Answer Efficiency of an algorithm can be measured
, for any resource that the algorithm consumes.
The most commonly measured resource is time.
Time Complexity - Answer The amount of time taken by an algorithm to run; commonly
expressed using big-O notation
Statement Counting - Answer A very basic form of grading algorithms where you try to
determine the exact number of statements executed to perform a task. This assumes
that each line of code takes the same amount of time to execute
Active Operation Approach - Answer Counts time by identifying one statement in the
algorithm that executes at least as often as any other, and is "central" to the algorithm;
this statement is called the active operation. Once we have selected the active
operation, we then determine the exact number of times the active operation executes
and this is our T(n) for the algorithm.
Big-Oh Notation - Answer A method of classifying the time complexity of an algorithm by
providing the upper bounds of the function
Big-Theta Notation - Answer A method of classifying the time complexity of an algorithm
by providing both the upper and lower bounds of the function. Big-Theta is a stronger
statement than Big-Oh or Big-Omega individually.
Big-Omega Notation - Answer A method of classifying the time complexity of an
algorithm by providing lower bounds of the function
Collection - Answer A data structure that is comprised of a set of data elements in some
conceptual arrangement (e.g. in a linear order in the case of a list)
Iteration - Answer A process of repeating a set of instructions a specified number of
times or until a condition is met