示例#1
0
 public double CalculerAirSalle(Salle salle)
 {
     double largeur = salle.Dimension.Largeur;
     double longueur = salle.Dimension.Longueur;
     double airCarre = largeur * longueur;
     return airCarre;
 }
示例#2
0
        public bool PossibleAjouterSection(Salle salle,Section section)
        {
            double airCarreSalle = this.CalculerAirSalle(salle);
            double largeurSection = section.Dimension.Largeur;
            double longueurSection = section.Dimension.Longueur;
            double airCarreSection = largeurSection * longueurSection;

            if (airCarreSalle > airCarreSection)
                return true;

            return true;
        }
示例#3
0
        public double NombreAirCarreRestante(Salle salle)
        {
            double airCarreSalle = this.CalculerAirSalle(salle);
            double airOccuper = 0;
            Section[] tabSection = salle.Sections.ToArray();
            foreach(Section section in tabSection)
            {
                double largeurSection = section.Dimension.Largeur;
                double longueurSection = section.Dimension.Longueur;
                double airCarreSection = largeurSection * longueurSection;
                airOccuper += airCarreSection;
            }

            double airRestante = airCarreSalle - airOccuper;
            return airRestante;
        }