CS 9F -- C++ for Programmers 1 unit, self-paced, P/NP; offered F, Sp. Restrictions on enrollment: CS 9F should be counted as a "computer science service course", with restrictions on credit toward graduation as specified in the rules for such courses. ABBREVIATED COURSE TITLE C++ FOR PROGRAMMERS INSTRUCTOR IN CHARGE M. Clancy, Senior Lecturer CATALOG DESCRIPTION Introduction to the constructs provided in the C++ programming language for procedural and object-oriented programming, aimed at students who already know how to program. PREQUISITE Programming experience equivalent to that gained in CS 61A, CS 9B, or Eng 77N. EXPANDED DESCRIPTION This course consists of several segments, each containing one or more quizzes and programming exercises: 1. Fundamentals. Types and variables; input/output; flow of control; functions, value parameters, and reference parameters; classes, member functions, public and private data, use of interface and implementation files; scope; function overloading. 2. Arrays, strings, and i/o streams. Indexing; multidimensional arrays; interaction of constructors for container/containee classes; straightforward use of files and string streams. 3. Linked structures. Pointers; new and delete; building and using linked lists and trees; use of iterators; the "this" pointer; copy constructors; destructors; memory allocation and deallocation. 4. Class design. Function and class templates; operator overloading; derived classes; virtual functions; friends. String and vector classes from the Standard Template Library are used in quizzes and assignments rather than their C-style counterparts. Students in general are discouraged from using C constructs that experience suggests will cause more trouble than they're worth. In the class design segment, students will analyze class definitions and provide code that implements a given inheritance structure or class description. They will not be expected to evaluate object-oriented designs. Multiple inheritance is not covered. Other constructs not covered in CS 9F include exceptions, functions declared in iomanip.h, inline functions, bitwise operators, and unions. TEXTBOOKS *A Computer Science Tapestry: Exploring Programming and Computer Science with C++*, second edition, by O.L. Astrachan (McGraw-Hill, 1999). *Computing Fundamentals with C++: Object-Oriented Programming and Design* (2nd edition), by Rick Mercer (McGraw-Hill, 1999). *C++ Program Design: An Introduction to Programming and Object-Oriented Design* (2nd edition), by James P. Cohoon and Jack W. Davidson (WCB/McGraw-Hill, 1999).