AmazonScrape.ScoreDistribution.ScoreDistribution C# (CSharp) Method

ScoreDistribution() public method

public ScoreDistribution ( double scores ) : System
scores double
return System
        public ScoreDistribution(double[] scores)
        {
            // Ensure that there are five categories being supplied.
            if (scores.Length != 5)
            {
                throw new ArgumentException("Score distribution must have five scores.");
            }

            _oneStar = new DoubleRange(scores[0],scores[0]);
            _twoStar = new DoubleRange(scores[1], scores[1]);
            _threeStar = new DoubleRange(scores[2], scores[2]);
            _fourStar = new DoubleRange(scores[3], scores[3]);
            _fiveStar = new DoubleRange(scores[4], scores[4]);
        }

Same methods

ScoreDistribution::ScoreDistribution ( DoubleRange oneStar, DoubleRange twoStar, DoubleRange threeStar, DoubleRange fourStar, DoubleRange fiveStar ) : System