Assignment 1: “ThrowingStuff”

Handed out: Thursday, August 29, 2002
Due: Tuesday, September 17, 12:00PM


Previous page | Next page


Description

Let the user choose the initial location and velocity of an object and then see the trajectory.

Details

The user has two menu options, b to throw an object, and q to quit.

To throw an object the user types in four integers which are the initial (x,y) location and the initial (dx, dy) velocity of the thrown object. Assume that the numbers are always between -1000 and +1000 (but don't bother to check that).

Your program then prints a sequence of locations of the object until it gets outside the -1000 to +1000 range.

When the user types an invalid menu choice your program needs to output a list of the (two) valid choices.

Files

You need to submit three files:

  1. ThrowingStuff.cxx, containing the main program,
  2. MovingObject.h, which is a header file for a suitable class, and
  3. MovingObject.cxx, which is the implementation file for that class.

How to submit those files will be discussed in a recitation.


Previous page | Next page | Back to top

3:40 PM, Thursday, December 12, 2002