public static void Main()
Console.WriteLine("Hello World");
private double capacity ;
private double currentamount ;
public Bucket(double Capacity,string caption)
this.currentamount= 0.0 ;
return(this.currentamount==0.0);
public void Fill(double amountToFill)
this.currentamount=this.currentamount+amountToFill ;
if (this.currentamount==this.capacity || this.currentamount>this.capacity)
this.currentamount=this.capacity;
public double GetCapacity()
public double GetCurrentAmount()
return this.currentamount;
public void PourInto(Bucket PourInto)
PourInto.GetCurrentAmount=PourInto.GetCurrentAmount+this.currentamount;
public override string ToString()
return strig.format("the capacity {0}, the current amount of bucket{1}",this.capacity,this.currentamount);