Final Review
- Introduction to C++
- Classes (review)
- Encapsulation
- Encapsulating data and operations
- Very important for data abstraction
- Templates
- Templates of classes and member functions
- You will be expected to know the syntax reasonably well. Syntax errors are acceptable if they dont indicate complete lack of semantic understanding.
template<class T, int max>
class example
{
public:
int size_of();
};
- Syntax of the class definition shown above is more important than syntax of function implementation
template<class T, int max>
int example<T,Max>::size_of()
{
}
- Pointers
- Most important thing is understanding the pointer operations in the context of linked lists
- Draw them pictorially, and may be translate them to C++ code
- Inheritance
- Understanding of the concept: The derived (child) class inherits all the members from its base (parent) class.
- The syntax of inheritance
- See the review from test-2
- Criteria to evaluate porgram performance
- Time requirements
- Rule of thumb: no loops: constant, one loop: linear, two NESTED loops: means quadratic.
- Of course this rule are not always true
- We used binary search algorithm where we had a loop, but the time was logarithmic
- Next semester, we will learn recursion where there are no loops but time could be as high as exponential
- Binary search: You should have a good understanding of how it works and should be able to draw search trees for linear as well as binary search
- A good question for compare and contrast as well.
- See test - 1 review for other possible questions
- ADT definition: the functionality is more important than the physical characteristics. In fact, functionality is the only important thing.
- ADT is defined in terms of its operations
- You should be able to use every ADT discussed in the class: list, stack, queue, set
- Programming questions will expect you to have a good understanding of the operations. 3-5 lines of code that involves the ADT operations.
- Descriptive questions involving different designs
- Questions based on your understanding of what this course is all about. See doubly.htm
- Priority is time, readability, memory