Example #1
0
        public double GetRate(double volume,
                              bool piano)
        {
            var rate = this.CreateRate(this.Distance, volume, piano);

            var price = rate.GetPrice();

            if (piano)
            {
                var pianoCondition = new PianoCondition();

                price = pianoCondition.GetFullPrice(price);
            }

            return(price);
        }
Example #2
0
        public double GetRate(double baseVolume,
                              double atticVolume,
                              bool piano)
        {
            // HACK - hard dependency between movement and volume, skipped in case of time
            var volume = this.GetTotalVolume(baseVolume, atticVolume);

            var rate = this.CreateRate(this.Distance, volume, piano);

            var price = rate.GetPrice();

            if (piano)
            {
                var pianoCondition = new PianoCondition();

                price = pianoCondition.GetFullPrice(price);
            }

            return(price);
        }