To use two ArrayList's or HashMap?
Hi,
I'm just a bit confused which to use here so was wondering could someone help me out please. My guideline is as follows.
A tax office registers a wide variety of vehicles, each of which has a license number, description, horsepower, year of manufacture, engine size and owner. Some vehicles are Heavy Goods Vehicles and for these HGV's, the tachometer number is stored(use inheritance).
Each vehicle has one owner and data stored about an owner includes id, name, and address.
The tax office needs to be able to:
Create new vehicles
Create new owners
And a few other things that i don't need to mention.
Basically what i want to know is in the Class TaxOffice should i use a HashMap of vehicles and have the vehicle object as the key and the owner as the value?
Or should i have two ArrayList's, one for vehicles and one for owners?
Thanks alot.
Message was edited by:
Capsud

