[Computing and Information Science Department]

Software Design Using C++

An Online Book

Old Version -- No Longer Maintained

Please Refer to the New Version

These web pages attempt to provide the material needed for three complete computer science courses: what are typically called CS 1, CS 2, and a data structures course, all using C++ as the programming language. (At St. Vincent these courses are numbered CS 110, CS 111, and CS 221).

The example programs were written and tested using Microsoft Visual C++ 5.0, although most of them should work fine with other C++ compilers as well. A new version of these web pages is available that was tested with Visual C++ 6.0 and Visual C++ .NET (and in most cases with g++ under Linux as well).

Even in the so-called "Intermediate" section, some CS 1 topics are reviewed, such as arrays, functions, and parameters, though some of the material is presented in greater depth than might be done in a CS 1 course. This is followed by an introduction to object-oriented programming and data structures. Special attention is paid to the design of software that is correct, readable, and as simple and elegant as possible. It is this author's contention that software should be crafted as a thing of beauty.

Some of the recently modified or newest features of C++ have not been included, or are only discussed toward the end of these Web pages. In some cases, older constructs have been deliberately used because they seemed to be simpler. Check your compiler's documentation and on-line help when in doubt about a particular feature.

Table of Contents

  1. Introductory Topics (CS 110)
    1. Simple C++ Programs
    2. Using the Compiler
    3. Simple Functions (no parameters or return values)
    4. Decisions, Decisions
    5. More Complex Functions (with parameters and/or return values)
    6. Repetition (loops)
    7. A Matter of Style: The Art of Programming
    8. Programming Patterns
    9. Basics of Arrays
    10. Using Objects
    11. Reading a Data Stream
  2. Intermediate Topics (CS 111)
    1. Software Engineering
    2. Functions and Parameters
    3. Arrays
    4. Records (Structures)
    5. Files (Streams)
    6. Objects and Classes
    7. More Complex Object-Oriented Features
    8. Recursion
    9. Pointers
    10. Linked Lists
    11. Stacks
    12. Queues
  3. Advanced Topics (CS 221)
    1. Some Computer Science Theory
    2. Advanced Linked Lists
    3. Binary Trees
    4. Heaps and Heapsort
    5. Hash Tables
    6. B-Trees
    7. AVL Trees
    8. C++ Exceptions
    9. External Sorting
    10. The Standard Template Library
    11. Using AppWizard
  4. For More Information

Author: Br. David Carlson
Last updated: 12/23/2003