CS 44001/54001 Computer Science III
Programming Labs

Lab policy. Unless stated otherwise the rest of the policies ar as for CSI found here.

You may develop your assignments on any platform (Windows/MS Visual Studio, Unix/GCC, Mac). However, your program should compile on departmental machine wasp or hornet using g++ command. Make sure to check that it properly compiles before submitting your code.

The URL for the subversion repository for this class is http://svn.cs.kent.edu/courses/cs44001/svn/YOURNAME Submit your lab assignment into a separate subfolder. Name the subfolder LabX where X is the lab number. If the lab contains several independent parts, name subfolder LabX_Y where Y is the part number.

Assignments

  1. Procedural Diff
  2. Word Count
  3. Templated List
  4. Roster with Class Schedule
  5. Roster with Class Schedule, Associative; Set of Students
  6. Fruit Processing, Container Adapters, Multimaps, STL Algorithms
  7. Updating Hash Container
  8. Singleton Logger, Templated Dice
  9. Abstract Car Dealership, Bridge Painted Square
  10. Adapter Moving Square, Prototype State Scheduler
  11. Decorator Observer Chain of Responsibility Coffee Shack
  12. Composite Visitor Genealogy, Checkpointed History
  13. Mediator Flyweight ATC, Keyed Registry

The following is considered bad programming practice and may be penalized:

  1. re-using portions of nearly identical code: i.e. copy-and-paste programing.
  2. using c-style strings instead of c++ style strings
  3. using a fixed-size buffer for variable-size collection of elements, i.e. hard-coding container size
  4. using variables where constants are appropriate e.g. using int i = 55; instead of const int i = 55; even if i is not modified again
  5. using excessive variable and constant scopes, for example declaring all variables/constants global or declaring them all at the beginning of a long function
  6. writing the source code lines over 80 characters
  7. not commenting your code
  8. using literal constants inappropriately, i.e. hard-coding the dimensions of the problem
  9. reading the same file multiple times from the disk
  10. inlining long (i.e. more than one or two line-) member functions
  11. defining classes in source (rather than header) files
  12. defining templates in source files
  13. placing executable code in header files
  14. using raw arrays instead of appropriate containers; using vectors where more specialized containers are appropriate
  15. using explicit loops instead of appropriate STL algorithms
  16. placing using namespace std; in a header file
  17. breaking out of infinite loops with break; instead of properly coding the loop termination condition
  18. giving constructs non-descriptive names: var1, intVar, myobj, func()