Example #1
0
        /// <summary>
        /// Calls the class method DatabaseInformation and counts the returned elements of the called method.
        /// </summary>
        /// <returns>The average cost of all cars.</returns>
        public int GetAverageCostOfAllCars()
        {
            int countOfCostPerUnit      = databaseInformation.getTheSumOfTheCostPerUnit();
            int countTheNumberOfAllCars = GetTheNumberOfCars();

            return(countTheNumberOfAllCars / countOfCostPerUnit);
        }