static void Main(string[] args) { Bagi bagi = new Bagi(); Console.Write("A new empty bag has created\n"); Balls pallot = new Balls(10); Maila driver = new Maila("Driver", 1); Maila fairway = new Maila("Fairway", 3); Maila wedge = new Maila("Wedge", 55); bagi.AddBalls(pallot); bagi.AddMaila(driver); bagi.AddMaila(fairway); bagi.AddMaila(wedge); bagi.ShowContents(); string nimi = "Fairway"; bagi.RemoveMaila(nimi); bagi.RemoveBalls(2); bagi.ShowContents(); }
public void AddBalls(Balls ball) { Console.WriteLine("Added{0} balls to the bag", ball); ballsit.Add(ball); }