Michael D Stiber
Covers language and development/execution environment differences, including data types, control structures, arrays, and I/O; addressing and memory management issues including pointers, references, functions, and their passing conventions; object-oriented design specifics related to structured data and classes. Co-requisite: CSS 342 Credit/no-credit only.
The overall goal of CSS 332 is to transition students who are competent developing small programs in one object-oriented programming language to developing larger programs another object-oriented language. Currently, it is assumed that students are familiar with Java and need to become familiar with C++, the language used in CSS 342/343. While the underlying concepts are similar, there are some differences in syntax and many differences in usage, particularly relating to memory management and the software development toolchain. This course is intended as an aid to your survival in CSS 342. The intention is to bring Java students up to speed in C++ as quickly and painlessly as possible. Consequently, this course is dense, taught concurrently with the first half of CSS 342. The intention is that the first programming assignment given in CSS 342 (review) is in conjunction with work in CSS 332. There may be additional in-class work that focus on specific aspects of C++. This course will be run as part lecture, part hands on lab.
Student learning goals
The C++ toolchain, including preprocessor, compilation, linking, and debugging in Windows, Mac OS, and Linux. The command line. Stream I/O and differences in text I/O between different operating systems.
Pointers, references, address-of operator, memory allocation and deallocation. Relationship between arrays and pointers. Pointer arithmetic. Pointers to functions. Operator precedence and derived types. void.
Heap and stack. Identifier scope; namespaces. Object lifespan and static. Lvalues and const. Pass by value and pass by reference.
Structures and C++ classes, header files, exceptions, memory management in constructors and destructors. Overloading built-in operators, both as methods and free functions.
Iterators and templates. Copy constructors. Deep vs. shallow copy. Memory management revisited.
C++ inheritance implementation. Implicit and explicit type conversion. Enumerations. Bit fields. Unions.
General method of instruction
Class assignments and grading