CS12 Topic list for midterm Book: 6.5--6.16 7.1--7.6 8.1--8.7 5.1--5.5, 5.7--5.9, 5.12 3.12--3.14 12.1--12.5 20.1.1 Not included in the list above are the case studies in these chapters, which could give useful insights into the topics presented. Some of the exercises at the end of the chapters may also be useful (I use them as inspiration when writing test questions). Classes declaration definition (implementation) division into separate files data members -- declaration data members -- initialization (not in class definition) data members -- how to access member functions -- writing member functions -- calling public & private the scope opertor :: constructor destructor inline functions accessor methods (return value of private data) mutator methods (change value of private data) memberwise copy with assignment objects as data members Overloading overloading functions (same name, different arguments) overloading functions (one function, default arguments) operator overloading why do it? keyword operator which operators may be overloaded (donšt memorize all, but know examples) restrictions on overloading how compiler translates overloaded operator friend functions overloading the insertion (<<) and extraction (>>) operators must be done as friend function takes ostream & as argument, returns ostream & one other argumemt 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). Makefiles what they are what they do how to use labels Compiling with g++ flags executable name Anything else mentioned in class may show up on the test. Review your notes carefully.