Test 2 Review
The overall course topics can be viewed on the course calendar.
Test 2 Learning Objectives
Students must be able to:
- Define the differences between static / dynamic variable definitions.
- Understand the basic concepts of the linear memory organization of modern computer memory.
- Be able to define pointer variables in C++.
- Apply the address operator to store variable locations in pointer variables.
- Use the dereference operator to access memory indirectly through pointer variables.
- Understand the concept and use of the NULL address.
- Be able to trace the effects of C++ pointer manipulation code upon memory and list diagrams .
- Distinguish the type of pointer and type of the memory contents to which a pointer refers.
- Typecast and typdefine pointer types.
- Understand the differences between direct and indirect memory accesses.
- Access struct (record) fields and class members through pointers using the dereference and arrow operators.
- Know the relationships between C/C++ pointer and array variables.
- Be able to allocate and deallocate dynamic memory.
- Understand and recognize "memory leaks" in C++ code.
- Re-size a dynamically allocated array.
- Understand the various effects of passing pointers as parameters using the different C++ parameter passing mechanisms.
- Use the C++ "const" modifier to safely pass pointers and the memory they reference.
- Compose and trace code to access arrays using pointer array arithmetic.
- Define an array of pointers and access memory through the pointer array elements.
- Recognize dynamic memory problems: garbage, aliases and dangling pointers.
- Understand the differences between reference variables and pointers.
- Distinguish between, (and know when to apply), function returns by "reference" and "value".
- Know the effects of assigning structs and objects using the C++ default assignment mechanism.
- Define and recognize and the "shallow copy" problem with structs/objects containing pointers.
- Be able to implement an assignment operator overload function for a C++ class to accomplish a "deep copy" of dynamic memory.
- Be able to implement a "copy constructor" function for a C++ class to accomplish a "deep copy" of dynamic memory.
- Recognize when a class assignment operator overload function or a copy constructor function for a C++ class is automatically invoked.
- Understand, apply and use the special "this" object pointer in C++.
- Know the advantages/disadvantages of single source code file / multi-source code files organizations.
- Understand the steps in separately compiling a multi-source code file program.
- Create interface/header and implementation/source code files for a multi-source code file organization.
- Know the inherent problems with traditional C, (not C++), function declarations as opposed to C++ function declarations.
- Be able to distinguish between identifier "declarations" and "definitions".
- How to setup, (and avoid), common memory areas across separate compilation units using the "extern" mechanism.
- Perform conditional compilation and avoid multiple header file inclusions.
- Trace and delimit identifier scope across separate compilation units.
- Create a C++ class containing a dynamically allocated array, with automatic re-sizing capabilities, an assignment operator overload and a copy constructor.
- Know how to define self-referencing structure and class types.
- Design a linked-list node type to act as a container for an encapsulated data type.
- Trace and understand code that forms and modifies linked-lists.
- Perform a traversal of a linked-list using C++ code.
- Recognize what constitutes the design of a robust, well-defined set of list operations.
- Reduce the data dependency between a linked-list and its stored data items to a minimum.
- Understand how to implement basic ordered linked-list operations on a C++ pointer/struct representation.
- Use the "trailer-pointer" mechanism and "one-node look ahead" mechanism to traverse a single linked-list in order to access the previous node.
- Be able to eliminate Boolean short-circuiting in linked-list operation code.
- Trace and identify the special cases that must be handled when implementing linked-list operations.
- Recognize and define a non-circular & circular single and double linked-lists.
- Trace C++ code upon non-circular & circular single and double linked-list diagrams.
- Match C++ code segments that will transform one non-circular & circular single and double linked-list diagram into another diagram.
- Understand an array of structs underlying implementation for linked-lists.
- Implement, trace code involving and understand the LinkNode Class and LinkList Class implementations covered in the course notes and lecture.
- Know how to implement a class destructor and when a class destructor is automatically invoked.
- Recognize implicit data element class dependencies in a linked-list container class.
- Be able to code member and non-member search functions for a linked-list class.
- Recognize and define recursion, Recognize and define recursion, Recognize and define recursion...
- Trace recursive C++ functions.
- Apply and recognize the recursive problem solving methods discussed in lecture: tail recursion, head recursion, middle decomposition, edges & center decomposition and backtracking.
- Know how function activation records are logically used to implement the underpinnings of recursive function execution.
- List the various components of a function activation record.
- Understand the organization of the common memory model for a C++ program.