Make a record to store information about a car. (This should seem familiar.) It should contain fields for:
Create an ArrayList of
Ask the user for the name of a file, and then open that file and read all that data from that file into the ArrayList.
Finally, sort the ArrayList of cars by year and print them out.
(Note: Printing them the "easy" way won't work unless you've
toString() method to the Car object.)
From which file do you want to load this information? cars.txt Data loaded. Data sorted. ArrayList: [1966 Ford Mustang (AZUCAR), 1980 Chevrolet Chevette (J43-SMB), 1985 Toyota Camry (622-VRX), 1993 Honda Civic (883-RS9), 1996 Dodge Neon (G74-LLC)]
©2013 Graham Mitchell
This assignment is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.