import java.util.*; /** * Write a description of class KjøretøyStall here. * * @author (your name) * @version (a version number or a date) */ public class KjøretøyStall { // instance variables - replace the example below with your own private ArrayList togListe; private HashMap bilerMap; /** * Constructor for objects of class KjøretøyStall */ public KjøretøyStall() { // initialise instance variables this.togListe = new ArrayList(); this.bilerMap = new HashMap(); } public void addTogList(Tog tog) { togListe.add(tog); } public void addBilMap(Bil bil) { bilerMap.put(bil.getModell(), bil); } public void printTogList() { for(Tog tog : togListe) { tog.print(); } } }