A Computer Science Tapestry, second edition

ISBN: 0072322039

In May 2009 I became aware that the book has gone out of print in the United States. It had been out-of-print for at least two years, if not more, but I hadn't been notified and it was still available because of excess stock.

Because the book is out of print, rights revert to me. I'm making it available via Creative Commons License
a Creative Commons Attribution-Share Alike 3.0 United States License.

The entire book is available as a pdf. This is the same content, in the same format, as the original book, though the pages have some of the markup still visible. See below for links to individual chapters and code.

( first edition web page)

Solutions to end-of-chapter exercises. You'll need a login and password. The password from the first edition still works. A new login/password works too, the same pair that Stuart Reges uses for his information. To get the login/password send me email and "proof" you're a teacher [web address, phone number, personal testimony that you don't lie, etc.]

The second edition of A Computer Science Tapestry: Exploring Computer Science and Programming with C++, published by McGraw-Hill, was published in fall of 1999. The book is out-of-print, though you can get it at via several online sources. Use your favorite search engine.

Code is also accessible in formats for Windows and Linux/Unix platforms. The windows code should work on Macintoshes, let me know if there's a problem.

Table of Contents Howto Contents
  1. Computer Science and Programming
  2. C++ Programs: Form and Function
  3. Program Design and Implementation
  4. Control, Functions, and Classes
  5. Iteration with Programs and Classes
  6. Classes, Iterators, and Patterns
  7. Class Interfaces, Design, and Implementation
  8. Arrrays, Data, and Random Access
  9. Strings, Streams, and Operators
  10. Recursion, Lists, and Matrices
  11. Sorting, Templates, and Generic Programming
  12. Dynamic Data, Lists, and Class Templates
  13. Inheritance for Object-Oriented Design
  1. How to: use basic C++, syntax, and operators
  2. How to: format output and use streams
  3. How to: use the class string
  4. How to: understand and use const
  5. How to: overload operators
  6. How to: understand and use standard libraries
  7. How to: understand and use Tapestry classes
  8. How to: use the graphics clases in canvas.h
  9. How to: cope with C++ environments

Chapters

The entire book.

Data files

The data files referred to in the text are browsable here

Code

This code has been tested under Visual C++ and Metrowerks Codewarrior, here's a zip file of programs, windows format and here's a directory for browsing individual files.

Library

These are the files I put in the library we use in our courses. There's no reason to put all the .cpp files in the library. If you don't make a library, you can add these .cpp files to your project and just change the file(s) in the project that students write (the one with main in it and supporting files if any).

For Linux/Unix use this compressed tar file which includes a Makefile for creating a libtapestry library to link with programs. Note, with g++ 2.91 the CList class doesn't compile, but it does compile with 2.95, these are the compilers I tested with.

If you're using the Sun CC compiler, try this compressed tar file, but note that bool is not built-in and I haven't tested everything. There isn't a standard STL like string class, so I built this using "tstring.h"

For core tapestry files and graphics files, including projects for creating libraries under Visual C++ and Metrowerks Codewarrior, see the TOOGL home page.


Owen L. Astrachan
Last modified: Thu May 28 11:50:25 EDT 2009