[CSC 204] Get'r Done
Andrew J. Pounds
pounds_aj at mercer.edu
Wed May 6 13:59:13 EDT 2009
I know several of you are working feverishly away on program 6. Some
points and pointers to note:
1. You get most of the accuracy points simply for getting your plane to
pick up and deliver some passengers -- but you must use some algorithm
to make the decision. In other words, don't look at the sample input I
gave you and "hard code" your plane to fly to Atlanta and Daytona.
2. This project is MUCH easier if you use multiple objects and stuff
some of those into an array or ArrayList. For example, I had an object
for each line of the zipcoords file and stuffed all of them into an
ArrayList for easy indexing. I also had an object for the airports,
passengers, and even my plane.
3. Your output should follow the guidelines in the program document,
but it does not have to look exactly like mine. I worked hard on mine
to make it neat so you could see exactly what was going on.
4. For those trying to get done quickly. simplifying your algorithm by
refueling at every destination.
I have found it easiest to keep track of time using instance variables
stored in my plane object. Every time you fly, land, or refuel you update
the amount of time base on either the distance flown, the time to land,
or the time to refuel.
I'll be near a computer for the next several hours -- so e-mail me if
you have questions.
--
Andrew J. Pounds, Ph.D. (pounds at theochem.mercer.edu)
Associate Professor of Chemistry and Computer Science
Mercer University, Macon, GA 31207 (478) 301-5627
More information about the csc204
mailing list