CS12 Topic list for midterm Book: Chapters 5.1--5.5, 6--8 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 parameters to constructor default parameters initializer lists destructor accessor methods (return value of private data) mutator methods (change value of private data) memberwise copy with assignment objects as data members self reference to calling object (*this) cascading Operator Overloading why do it? keyword operator which operators may be overloaded (donšt memorize all, but know examples) restrictions on overloading overloading unary operators, binary operators how compiler translates overloaded operator method how compiler translates overloaded function (not part of class) friend functions overloading the insertion (<<) and extraction (>>) operators 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 *) pointer arithmetic pointers and arrays accessing array elements through pointers using pointers to pass parameters by reference 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 problems can occur overloading the = operator for copying dynamically allocated memory. Anything else mentioned in class may show up on the test. Review your notes carefully.