using System; public class Barman { public int NumberOfBottlesAtTheBegining; public int CurrentNumberOfBottles; BDChannel barmanChannel; public Barman( int numberOfBottles ) { this.NumberOfBottlesAtTheBegining = numberOfBottles; this.CurrentNumberOfBottles = numberOfBottles; barmanChannel = new BDChannel(); } public int HowManyBottlesOnTheWall() { // Ask the barman - How many bottles are left on the wall? HowManyBottlesLeft ! (); return (int) barmanChannel.Receive() [0]; } public void AnswerHowManyBottlesLeft() & Channel HowManyBottlesLeft() { barmanChannel.Send( CurrentNumberOfBottles ); } public void TakeOneDown() & Channel PassOneAround( string replicaFromSinger ) { Console.WriteLine( replicaFromSinger ); CurrentNumberOfBottles--; if ( CurrentNumberOfBottles > 0 ) Console.WriteLine( "Take one down and pass it around, {0} bottles of beer on the wall.", CurrentNumberOfBo