static void Main(string[] args) { var cPlayer = new CricketPlayer("Hardik Padya"); Bat bat = new Bat(); cPlayer.Play(bat); bat.StartPlay(cPlayer); // Uncomment below lines and comment above two lines to see the output of codes below. //Console.WriteLine($"Name of the Player is: {cPlayer.GetPlayerName()}"); //Console.WriteLine($"Brand of Bat is: {bat.GetBrandName()}"); Console.ReadKey(); }
public void Play(Bat bat) { bat.StartPlay(this); }