Assignment 3 advice

Written by Julie Zelenski

Here's our best advice on how to hit a home run with your CVector and CMap implementation!

Good design for both CVector and CMap

Design issues specific to CVector

Design issues specific to CMap

Pointers, memory, typecasts


Minor code quality reminders

Incremental development

Attempting to implement and test all of the operations simultaneously is sheer lunacy. One operation at a time! If your cmap_get isn't finding an entry, is it because cmap_get searches incorrectly, cmap_put didn't store the entry, cmap_remove mistakenly removed it, rehash scrambled the table, or something else entirely? If you build one operation at a time and throughly test/debug before moving on, you have a reliable foundation to build on and won't be forced into trying to debug all the code all the time. Here is a suggested order of attack:

CVector (definitely do vector first, its implementation is much simpler)


Testing is HUGE!

(You have read our page on effective software testing, right?) This assignment will require a more significant investment in testing than any previous assignment. The number of variables in play (settings for CVector/CMap when created, which operations are called in which order, etc.) create many diverse code paths to verify. If your testing passes through only a limited subset of those paths, then you can't be confident it will stand up to our rigorous grading scrutiny. Be vigilant and thorough!


Program facts