The weight for each question is given with the question.
Use as much paper as you wish, but make your answers are legible.
Please answer each question thoughtfully and carefully.
[6 points] What are data encapsulation and data hiding? Why are these techniques employed?
[12 points] Describe ADT queue. Include a description of the domain, operations and performance expectations.
[12 points] Describe the member functions which should be included with any class containing dynamic memory. Discuss why each should be present.
[6 points] Describe how memory can be allocated at run time. Give a c++ example.
[4 points] Describe how dynamic memory is disposed of. Give a c++ example.
[4 points] Why would a programmer employ dynamic memory?
[4 points] Describe two common errors associated with dynamic memory.
[6 points] What is a linked list? How is a linked list different from an array?
[20 points] Declare and implement a c++ class which contains an unordered linked list. Include member functions to insert, delete, and locate an item in the list.
[10 points] Write a recursive c++ binary search routine. The routine should take an array of integers, the position from which to start searching and the position where the search ends.
OVER
[10 points] Given an implementation of an integer stack, which includes Push, Pop, and Top, trace the execution of the following code: