Solution to Project 1
Various versions of the solution will be posted here.
The versions represent different stages in the development of the solution.
Paying attention to this sequence of versions will give you insights into
how a fairly large programming project can be broken up into pieces and
how each piece might be developed and tested.
Most of the work was in getting Version 1 done. After that it was a matter of
making small increments to the code to obtain each subsequent version.
- Version 1: (posted 10/20) This version supports the += operator for inserting
nodes and edges into a graph, along with the get_neighbors function.
The delete operations are not supported,
none of the classes are templated, and there is no error checking of any
This was compiled using the command:
g++ -o driver1 apstring.cxx node1.cxx edge1.cxx graph1.cxx driver1.cxx
- Version 2: (posted 10/24) This version was obtained by adding to
the graph class in version 1, support for the -= operator for
deleting nodes and edges into a graph.
None of the classes are templated, and there is no error checking of any
Also, there is no resizing yet, in the function that deletes nodes.
I am providing the entire set of the files again, but the only files
that have changed since Version 1 are graph.h, graph.cxx,
I am also providing output files corresponding to the given input files.
You can use these to check the output produced by your programs.
- Version 3: (posted 10/25) This version was obtained by adding error
checking to version 2.
In addition, resizing if necessary, has been added to the node deletion
The only file that has changed from version 2 is graph.cxx.
However, I am providing the entire set of the files again.
I am also providing a couple of input files that test all of the error checking
required of the progrem.
The corresponding output files are also provided.