CSCI 2270
Computer Science 2:
Data Structures
Fall 2003
Karl Winklmann
Handed out: Tuesday, September 9, 2003
Due: Friday, September 26, 2003
Use dynamically allocated arrays to store the necessary information. Start out with an array of size 8.
Give the user these menu options:
void showMenu ()
{
cerr << endl <<
" t: launch new ball " << endl <<
" r: read input from a file " << endl <<
" n: start new picture " << endl <<
" s: store current picture " << endl <<
" d: display the previously stored picture " << endl <<
" q: exit " << endl;
}
Assume that when the user wants to read the input from a file, the file contains some number of lines, each containing six integers that specify the initial values of x, y, z, dx, dy, and dz for throwing another ball. Don't do any error checking on that input, other than checking if the file exists.
Compiles without errors: 10
Reasonable and consistent style: 10
Objects move properly in 3D: 10
Distant objects appear smaller: 10
Distant objects don't obscure closer ones: 20
Using dynamically allocated arrays: 20
Ability to remember and redisplay a picture: 20
________________________________________________
Total: 100
| © 2003 Karl Winklmann | 3:08 PM, Tuesday, December 16, 2003 |