CSCE
156
Handout 15: Final Exam Review
Exam 1 Topics
1. Introduction to C++
· Formal parameters vs. actual parameters
· Pass by value vs. pass by reference
· Implementation file vs. header (interface) file
· Four pillars of OO Programming: Abstraction, Encapsulation, Inheritance, Polymorphism
· Information hiding
· Abstract data type
· Inheritance
o base class, derived class
o public, private, and protected
· Polymorphism
o Operator overloading
o Function overloading
o Templates
§ Function templates
§ Class templates
2. Pointers and Array-Based Lists
· Pointer variable
· Address of Operator (&) vs. Dereferencing Operator (*)
· Dynamic variables, dynamic arrays
· Passing a pointer variable to a function via pass-by-value and pass-by-reference
· Shallow copy vs. Deep Copy and impact on pointers
· Three peculiarities with classes that contain pointer data members
o Destructor
o Assignment Operator
o The Copy Constructor; Three scenarios:
§ (1) Default member-wise initialization,
§ (2) When, as a parameter, an object is passed by value, and
§ (3) When the return value of a function is an object
3. Linked Lists
· Definition and operations
· Properties and how to traverse a linked list
· Manipulations:
o Delete a node
o Insert a new node
o Switch two nodes
o Building a linked list forward
o Building a linked list backward
· Sorted linked list
· Doubly linked list
· Circular linked list
· When to use which kind of linked list?
4. Complexity
5. Database Applications and the Web
o Client Tier: Web browser, HTTP
o Middle Tier: Web server, PHP
o Database Tier: DBMS or Database server, SQL
Exam 2 Topics
1. Recursion
· Stopping conditions, end cases, recursive step, integration step
· Winding vs. unwinding
· Recursive solutions
2. Stacks
· Definition and operations
· Properties and how to access a stack
· The concept of Last In First Out (LIFO)
· Manipulations, for example:
o Pop
o Push
o Top
· When to use a stack as opposed to a linked list or a queue?
· The concept of backtracking using stacks
3. Queues
· Definition and operations
· Properties and how to access a queue
· The concept of First In First Out (FIFO)
· Manipulations, for example:
o AddQueue
o DeleteQueue
o Front
o Back
· When to use a queue as opposed to a linked list or a stack?
· The concept of priority queues
4. SQL and MySQL
o How to create a table
o How to modify an entry
o How to access an entry
o How to combine queries and display retrieved results (ORDER BY, GROUP BY, HAVING, WHERE, etc.)
5. Search
o Hash tables
o Hash functions: Mid-Square, Folding, Division (Modular Arithmetic)
o Collision Resolution: open addressing (closed hashing) and chaining (open hashing), and when to use which design
New Topics
1. Sorting
· Insertion, selection, exchange sorts
· Heapsort, mergesort, quicksort
o Advantages and disadvantages
· Complexity of sorting algorithms
o Lower bound on comparison-based algorithms
2. Binary Trees
· Definition of a binary tree
o Elements of a binary tree
o Traversals (inorder, postorder, preorder)
· Properties and operations of a tree as an ADT
· Definition of a binary search tree
· Properties and operations of a binary search tree as an ADT
o How to insert a node
o How to delete a node (all four cases)
· Definition of an AVL (height-balanced) tree
· How to perform left rotations, right rotations, and double rotations
· When to perform left rotations, right rotations, and double rotations
· Why AVL?
3. Graphs
· Definition of a graph
o Elements of a graph
o Adjacency matrix
o Adjacency list
· Properties and operations of a graph as an ADT
· Graph traversals
o Depth first
o Breadth first
· Graph algorithms
o Shortest path – Dijkstra’s algorithm
o Minimal spanning tree – Prim’s algorithm
§ Definition of a spanning tree.
§ Definition of a minimal spanning tree