[CSC 204] Counting Passengers

Andrew J. Pounds pounds at theochem.mercer.edu
Mon May 4 19:52:56 EDT 2009


You could make an object that has instance variables for the city name 
and state, the number of people boarding in that city and the number of 
people deplaning in that city.  You could then stuff all those objects 
in an array or ArrayList.


> Hi Dr. Pounds,
> Currently I am working of Program 6 and I am trying to figure out how i can
> add up the most passengers leaving a city. Can you reccommend a solution to
> read in the file and go through the file and add the info to the array list
> and add up the number of occurrences for the numbers of cities, which will
> indicate how many passengers are leaving from a specific city. But right now I
> am really stuck on that. Can you help?
>
>   
>


-- 
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