示例#1
0
 public void VerwijderSchip(Schip schip)
 {
     if (schepenLijst.ContainsKey(schip.Naam))
     {
         schepenLijst.Remove(schip.Naam);
         schip.Vloot = null;
     }
 }
示例#2
0
 public void VoegSchipToe(Schip schip)
 {
     if (!schepenLijst.ContainsKey(schip.Naam))
     {
         schepenLijst.Add(schip.Naam, schip);
         schip.Vloot = this;
     }
 }
示例#3
0
        public void WijzigSchipVanVloot(string schipnaam, string vlootNaam)
        {
            Schip schip = ZoekSchip(schipnaam);

            if (schip != null)
            {
                vlotenLijst[schip.Vloot.VlootNaam].VerwijderSchip(schip);
                vlotenLijst[vlootNaam].VoegSchipToe(schip);
            }
        }