CSCI 2270
Computer Science 2:
Data Structures
Spring 2003
Karl Winklmann
Recent news items :
Exemptions from final exam
Anyone who has earned all 900 possible points so far can afford to get zero points on the final and would still get an A (not an A-) in the course. Such people can therefore afford not to show up for the final.
Extending this exemption a bit further, we will assume that anyone who has earned 875 or more points so far would easily get 25 points or more on the final and hence get an A for the course. Such people can therefore also afford not to take the final and still get an A.
Handed out: Monday, January 27, 2003
Due: Friday, February 21, 11PM
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: launch a number of random balls " << endl <<
" e: 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 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 (or any other) input, other that 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