예제 #1
0
        /// <summary>
        ///helping method for calculating pure profit of the facility for the week by getting earned money
        /// </summary>
        /// <param name="money1">$ earned from tickets for adults/param>
        /// <param name="money2">$ earned from tickets for children</param>
        public static void CalculateProfit(double money1, double money2)
        {
            double profit;

            profit = money1 + money2 - (animal.Quantity() * animal.AnimalCareExpensesPerAnimalInDolars() +
                                        grizzly.Quantity() * grizzly.AnimalCareExpensesPerAnimalInDolars() +
                                        lemur.Quantity() * lemur.AnimalCareExpensesPerAnimalInDolars() +
                                        komodo.Quantity() * komodo.AnimalCareExpensesPerAnimalInDolars() +
                                        greatHornbill.Quantity() * greatHornbill.AnimalCareExpensesPerAnimalInDolars())
                     - Cashier.SalaryPerWeek() - Caretaker.SalaryPerWeek() - Manager.SalaryPerWeek() -
                     Medic.SalaryPerWeek() - Cleaner.SalaryPerWeek();
            Console.WriteLine("\n---------------------------");
            Console.WriteLine("Profit per week: {0} $", profit);
            Console.WriteLine("\n---------------------------");
        }