Assignment 2: “LotsOfStuff”

Handed out: Tuesday, September 10, 2002
Due: Tuesday, October 1, midnight


Previous page | Next page


Description

Instead of simulating the behavior of one object as done in Assignment 1, have a whole array of objects whose motion illustrates some interesting concept of science or mathematics.

Details

The user has four menu options:
void showMenu ()
{
    cerr                                                  << endl;
    cerr << "   case 'm': // move for a number of steps " << endl;
    cerr << "   case 's': // save status "                << endl;
    cerr << "   case 'r': // resume status "              << endl;
    cerr << "   case 'q': // quit "                       << endl;
    cerr                                                  << endl;
}
As always, when the user types an invalid menu choice your program needs to output a list of the valid choices.

Files

You need to submit five files:

  1. LotsOfStuff.cxx, containing the main program,
  2. MovingObjects.h, which is a header file for a suitable class of a set of objects, and
  3. MovingObjects.cxx, which is the implementation file for that class.
  4. MovingObject.h, which is a header file for a suitable class of single objects, and
  5. MovingObject.cxx, which is the implementation file for that class.


Previous page | Next page | Back to top

3:40 PM, Thursday, December 12, 2002