COP-3337, Intermediate Programming Code
Textbook Code
Algorithms, Data Structures, and Problem Solving in C++
matrix.h
C++: How to Program
In-class Examples
The string reversing example, June 30
File example #1 (not done in class)
File example #2 (not done in class)
Code from Chapter 2
The
IntCell
demo:
IntCell.h
IntCell.cpp
TestIntCell.cpp
(the whole project, 704K)
The
Rational
demo:
Rational.h
Rational.cpp
RatMain.cpp
The
string
class (don't bother looking inside of Except.h):
mystring.h
string.cpp
Except.h
The big-three demos (with pointers):
BuggyIntCell.cpp
DeepIntCell.cpp
Code from Chapter 3
The
Swap
and
Min
function template demo:
FuncTemplates.cpp
The
MemoryCell
class (note: you will need all these files, but only the last three go in the project):
MemoryCell.h
MemoryCell.cpp
IntMemoryCell.cpp
StringMemoryCell.cpp
TestMemoryCell.cpp
The
matrix
class template with test program:
matrix.h
TestMatrix.cpp
Code from Chapter 16
Array-based stack, with test program:
Except1.h
StackAr1.h
StackAr1.cpp
IntStackAr1.cpp
TestStackAr1.cpp
Array-based queue, with test program:
Except1.h
QueueAr.h
QueueAr.cpp
IntQueueAr.cpp
TestQueueAr.cpp
Linked-list-based stack, with test program:
Except1.h
StackLi.h
StackLi.cpp
IntStackLi.cpp
TestStackLi.cpp
Linked-list-based queue, with test program:
Except1.h
QueueLi.h
QueueLi.cpp
IntQueueLi.cpp
TestQueueLi.cpp
A better
getline
The complete concordance program:
Concord.cpp
Recursive code
RecSum.cpp
PrintInt.cpp
BinarySearchRec.cpp
Math.cpp
MkChnge.cpp