public void AdaugaFusta(TipFusta tip, int numar) { Contract.Requires(tip != null, "tip fusta"); if (capacitateDepozit > 0) { var fusta = new Fusta(tip, numar); Fuste.AdaugaFusta(fusta); capacitateDepozit--; } else { Console.WriteLine("Nu mai sunt locuri in depozit"); } }
internal Fusta(TipFusta tip, int numar) { Contract.Requires(tip != null, "tip"); Tip = tip; Numar = numar; }