Ejemplo n.º 1
0
        public void payPenalty(double amount)
        {
            myPolicy.setTotalPenalty(myPolicy.getTotalPenalty() - amount);
            if (myPolicy.getTotalPenalty() == 0)
            {
                myPolicy.setIPState(myPolicy.getOngoingIPState());
                Console.WriteLine("Penalty paid out, policy returned to ongoing.");
            }

            else
            {
                Console.WriteLine("Penalty still not paid out!");
            }
        }