Exemplo n.º 1
0
 public void voegSchipToeAanVloot(Schip schip)
 {
     if (!Schepen.ContainsKey(schip.Naam))
     {
         Schepen.Add(schip.Naam, schip);
         schip.Vloot = this;
     }
 }
Exemplo n.º 2
0
 public void verwijderSchipUitVloot(Schip schip)
 {
     if (Schepen.ContainsKey(schip.Naam))
     {
         Schepen.Remove(schip.Naam);
         schip.Vloot = null;
     }
 }
Exemplo n.º 3
0
        public void plaatsSchipInAndereVloot(string schipNaam, string vlootNaam)
        {
            Schip s = null;

            foreach (Vloot v in Vloten.Values)
            {
                s = v.ZoekSchipOp(schipNaam);
            }
            if (s != null)
            {
                Vloten[s.Vloot.Naam].verwijderSchipUitVloot(s);
                Vloten[vlootNaam].voegSchipToeAanVloot(s);
                s.Vloot = Vloten[vlootNaam];
            }
        }