Exemple #1
0
 public bool Close()
 {
     if (_status == AviaryStatus.Opened && _inhabitants.Count == 0)
     {
         _status = AviaryStatus.Closed;
         return(true);
     }
     return(false);
 }
Exemple #2
0
 public bool Open()
 {
     if (_status == AviaryStatus.Closed)
     {
         _status = AviaryStatus.Opened;
         return(true);
     }
     return(false);
 }
Exemple #3
0
 protected Aviary()
 {
     _status      = AviaryStatus.Opened;
     _inhabitants = new List <Animal>();
     _number      = SetNumber();
 }