Chapter 7 Classes 1. The keyword const specifies that an object is not modifiable. 2. Class can be composed of objects of other classes. 3. A friend function of a class is a function defined outside that class and that has the right to access all members of the class. 4. The this pointer is implicitly used to reference both the member functions and data members of the object. 5. Each object has access to its own address by using this keyword. 6. The new operator automatically creates an object of the proper size, runs the object's constructor and returns a pointer of the correct type. To free the space for the object, use delete operator. 7. An array of objects can be allocated dynamically with new as in int *ptr = new int[100]; delete [] ptr; // to free the allocated space 8. A static data member have class scope. 9. A static member of a class can be accessed through an object of that class or through the class name using the scope resolution operator (if the member is public) 10. Class normally hide their implementation details from the client of the class. This is called information hiding. 11. Stacks are known as last-in first-out data structure. The last item pushed on the stack is the first item popped from the stack. 12. Describe the functionality of a class independently of its implementation is called data abstraction C++ define classes so-called ADT. 13. The primary activity in C++ is creating new data types(classes) and expressing the interactions among objects of those data types. 14. ADT is the way of representating real-world notions to some satisfactory level of precision within a computer system. 15. An ADT captures the data representation and the operations that are allowed on that data. 16. C++ is an intentionally sparse language that provides programmers with only the raw capabilities needed to build a broad range of systems. The language is designed to minimize the performance burden. 17. Items are returned from a queue in first-in first-out order -- the first item inserted (added) in the queue is the first item removed (deleted) from the queue. 18. Container class are designed to hold collections of objects. Container class commonly provide services such as insertion, deletion, searching, sorting, testing an item for membership in the class, and the like. 19. An iterator is an object which returns the next item of a collection. 20. After deleting dynamically allocated memory, set the pointer that referred to that memory to 0. This disconnect the pointer from previously allocated space on the free store. 21. Declaring an object as const helps enforce the principle of least privilege. Attempts to modify the object are caught at compile time rather than causing executing time error. 22. A const object can not be modified by assignment, so it must be initialized. 23. One form of software reusability is composition in which a class has objects of other classes as members. 24. In C++, you can pass objects to function (as in C) or pass functions (or messages) to objects. 25. In C++, the programmer is able to create new types (class) through the class mechanism. So, C++ is an extensible language.