List-String
Due August 6th @ 8pm
A Sample Solution
Overview
This assignment will test your usage of C++ classes and basic
linked-list operations.
Details
You are working on a text manipulation package for a simplified
dialect of Martian. The Martian dictionary, when written using the
roman alphabet, is overwhelmingly comprised of words that are a
multiple of 5 letters long. In an effort to optimize memory usage for
this situation, you've been tasked with developing a replacement for
the standard string class that stores words as a linked-list of
smaller strings, each of which is no more than 5 characters
each.
All of the design and test-generation has been worked out already, all
that falls to you is to implement this class.
Files
Download the following files:
- liststring.h this holds the interface
for your string class. You may NOT change any part of it. Your
submission will be compiled with this version of the header file, so
if you make any changes it is likely your assignment will not compile
and you'll get no credit.
- main.cc this holds all of the testing that
we will do when grading your submission. Again, you should not change
this, as we will be grading with this version of the file, although we
may adjust the point values for each test.
Requirements
- You must provide a Makefile that compiles main.cc and your .cc
files separately.
- Remember that your code must compile with the flags -W -Wall
-Werror -pedantic
- Every function must run in O(n). You will get no credit
for any functions that are quadratic or worse.