Index of /ftp/weiss

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[   ]C++_code.July94.Z 1994-07-22 09:58 38K 
[TXT]ECP 1995-03-20 13:05 182K 
[   ]Sorting.mkr 1996-12-13 15:13 391K 
[   ]WEISS_2E.tar.Z 1995-01-22 15:12 41K 
[   ]WeissAda.tar.Z 1995-02-06 13:45 38K 
[SND]cool.mid 1996-07-29 09:27 30K 
[DIR]dsj/ 1998-05-09 11:54 -  
[DIR]slides/ 1996-06-11 23:58 -  

These are the code fragments from the textbook

	Data Structures and Algorithm Analysis in C++
	Mark Allen Weiss
	Benjamin/Cummings, 1994
	ISBN: 0-8053-35443-3

My intent is to allow instructors to easily make overhead
transparencies, and to allow students to save the time
of directly typing in source code.  Thus, these are not
complete programs.  Students must still figure out how
all of the pieces fit together.

TO USE: Uncompress the .Z file, and then sh the result.

Some of the classes in the text exhibited the following problems,
which I believe are all relatively minor:

1. The copy constructors are incorrect. The intention is to
   discourage their use, which I believe is the right thing
   to do. The problem is that the implementation by using
   operator= is incorrect. A better solution is to place the
   prototype for the copy constructor in the private section.

2. Some routines such as linked lists and trees declare a
   struct node internally. CC does not yet implement this.
   You'll have to move it out of the class. g++ and Borland's
   compilers have no problems.

3. In many places, the constructor for the node struct assumes
   a default Etype is 0. This doesn't work for every Etype.
   The solution is to add a zero-parameter constructor and
   remove the default for Etype.

4. Alot of the classes overload ( ) to return an Etype.
   It's better to return a const reference. Things get
   tricky here, however. For example, PopAndTop for a stack
   implementation can return a const reference, but for
   a linked list implementation, a const reference would
   refer to an item in a deleted node!

The code here reflects these changes.

--Mark Weiss