CS12 Topic list for final The final is comprehensive. All topics on the midterm topic list are fair game. In addition, you are responsible for the following topics: ^^^^^^^^^^^ Book: 3.12--3.14 7.7 9.1--9.12 10.1--10.5, 10.8 12.1--12.6 15.1--15.4 20.1 More on classes: - Copy constructors - when used - automatic - copies (value parameters) - return values - explicit - declaration and initialization in the same statement - to make a copy of an object: A.List(B); will make A be a copy of B List A(B); will create A and place a copy of B in A. - why use - when object contains pointers - to avoid major problems when destructors are called - constructor initializer lists - before actual code in constructor (before the { ) - assign values to data members Pointers what are they (addresses of memory locations) declaring (must be pointer to some type assigning value of existing variable of another pointer (to same type) of dynamically allocated memory location dereferencing a pointer (with *) Const/non-const pointers to const/non-const objects (four possibilities) pointer arithmetic pointers and arrays accessing array elements through pointers using pointers to pass parameters by reference strings what are they (arrays of characters) special character '\0' (terminates all strings) allocating space (word length + 1) string manipulation using pointers string.h functions (no need to memorize, know they exist) Pointers and classes the "this" pointer (used in methods only, refers to the invoking object) pointers to objects accessing object members and functions by dereferencing (*p).x or p->x copying objects containing dynamic data where problem scan occur overloading the == operator copy constructors Recursion writing recursive functions two conditions: terminating condition (base case) progress towards base case (problem gets smaller) determining the output of a recursive function Templates Template functions writing calling Template classes writing using container classes Standard Template Library (know it exists, what kind of things are in it). Inheritance - base classes - derived classes - declaring a derived object (base class constructor called first) - invoking methods with derived object (derived methods used first) - public, private and protected data/methods - public, private and protected inheritance - invoking base class constructor in derived object constructor (in constructor initializer, see above) - base class object pointers pointing to derived objects - polymorphism - virtual functions - virtual destructors - pure virtual functions - abstract base classes Lists - implementations: - singly linked lists - doubly linked lists. - operations - traversing - inserting - removing one node - deleting entire list - searching. - dummy nodes and their uses. - maintaining sorted data. Environment and C legacy issues Makefiles what they are what they do how to use labels Compiling with g++ flags executable name Redirecting input/output Arguments to main() argc, argv i/o with printf, scanf dynamic memory allocation with malloc() Anything else mentioned in class may show up on the test. Review your notes carefully.