Exemplo n.º 1
1
 public Flat(
     int number,
     double area, 
     int floor=1, 
     int countRoom=1, 
     int peopleLiving=0, 
     int peopleRegister=0,
     Owner owner = null,
     Account account = null,
     Tentant tentant = null,
     Payment payment = null,
     Counter counter = null,
     int debt=0)
 {
     this.Number = number;
     this.Area = area;
     this.Floor = floor;
     this.CountRoom = countRoom;
     this.PeopleLiving = peopleLiving;
     this.PeopleRegister = peopleRegister;
     this.Owner = owner;
     this.Debt = debt;
     if (account != null)
     {
         this.Accounts.Add(account);
     }
     if (tentant != null)
         this.Tentants.Add(tentant);
     if (payment != null)
         this.Payments.Add(payment);
     if (counter != null)
         this.Counters.Add(counter);
 }
Exemplo n.º 2
0
 public void Add(Counter counter)
 {
     if (counter != null)
         this.Counters.Add(counter);
 }