views:

16

answers:

0

Hi guys, got a few questions

  1. i have initialised my collection with a few objects, how do i set the make etc when i initialise them (i have the set methods). So in the line below where would i put setMake()? would it work with a . accesor after LargePlane?

    planesAvailable.put("502146", new LargePlane());

  2. Im also having a problem with when i create and put objects in the collection i use the key (above 502146) which is the registration of the object how can i set that to the registration within the collection? (when i print out the collection the registration is null).

  3. Also I have overided toString(), i have a bunch of types (eg. LargePlane, SmallPlane) that could be in this collection, how do i print like LargePlane? I've tried like typeOf() and stuff but it doesn't work, do i need to import something?

Thanks