CS12 Topic list for midterm Book: 5.1--5.5, 5.7--5.9, 5.12 6.5--6.16 7.3--7.6 8.1--8.7, 8.11 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 overloading unary operators overloading binary operators overloading ++ and -- overloading the = operator 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 pointers to objects accessing object members and functions by dereferencing (*p).x or p->x 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.