| CIS29 - Advanced C++ - Joe Bentley |
Note: output is required for all assignments - you must turn it in with your code.
This first assignment is longer and probably more difficult than the remaining assignments. You should expect to spend more time on it. You will need to clarify the program requirements. Make sure you ask for help or clarification as needed.
Note: there was an error in the original partial output for this assignment. The second misspelled word should be struggled, not lives.
Review - Inheritance, Polymorphism, C++ Input/Output & File I/O
Assignment 2 input data file Copy and paste this into a file called "ass2data"
A Spell Checker using string and istringstream
Note: a last minute correction in the output. The following line should be added:
Line 107: alleghenies not found in the Dictionary
More Geometry, Multiple Inheritance, and C++ Style Casts
Tuesday 10/20 10 pm update:
I would like to amend the suggestion that I made tonight regarding the approach for the overloaded GeometricSolid and ColoredThing insertion operators. I had suggested doing a "downcast" to a ColoredThing pointer inside the GeometricSolid insertion operator. I changed my mind (that's not the best approach). Try this - do the downcasts in main() - casting your Thing pointer to a GeometricSolid pointer and then to a ColoredThing pointer. This should be much easier. Here's some of my code:
if (dynamic_cast<Solid*>(ptrThing))
{
cout << (*(dynamic_cast<Solid*>(ptrThing)));
}
Libraries and exception handlng
October 25th: The assignment requirements were changed - the InvalidLong exception was removed and a new input data file was added.
A Generic Hash Table Spell Checker