CSE 326

Exercise Set #1

6/21/00

Due: beginning of lecture Wed. 6/28/00

 

I. Individual problems: Each student should work alone and turn in answers for the following problems, all from the Weiss textbook:

 

p.39ff:

            1.5, 1.6.  You don't need to compile or run, you don't need to write a full program, just code the functions requested.  Handwritten is fine if perfectly legible.

            1.13.  Do compile this one.  "Design" means give the class definition (interface); you don't have to implement the functions if the problem just says "design."  "Design" also implies you have some minimal comments to explain what you have done.  Then, I would like you to also implement the function isEmpty; give it a separate implementation (outside the class definition, not in-line).  Finally, at the end of the .cpp file, put a couple of sample instantiations (i.e., declare a couple of global variables of the new class).  Put this all in a single .cpp file.  (Ordinarily, of course, the class interface would be in a .h, the method implementations in a .cpp, and usages in other .cpp's.  Let's not bother, this time, especially since separate compilation of template method implementations is a problem with some compilers).

 

p.62ff:

            2.1, 2.11, 2.25. 2.27

 

 

II. The following should be done as a 2-person team effort.  Notes:

            1. The person you team with this time cannot be teamed up with on the next two-person assignment.

            2.  Hand in only one copy of the HW, with both people's full names on it.

            3. Attach a short paragraph which explains who did what (ie., how you divided up the work), and what percentage contribution each person made to the total effort.  This can be handwritten if legible.  Each person should sign the paragraph to acknowledge that they agree with it.

 

2.7.  Do the analysis (paper and pencil) on all of these.

Then, pick one, and actually code it up and run it.  The programs do not have to be pretty or fancy, as long as they correctly implement the algorithms.  We'll give you some help on how to do the timing (what functions you can call to get timing information).   When you have all your data, write up a little "lab report" (that's really what part c is).  Please do more than just give a table of the results.   Think of it in terms of a scientific experiment whose results you are discussing.