Esempio n. 1
0
        public void TerminatePass()
        {
            double price;
            double refunded;

            if (vsp.VehicleType == "Car" || vsp.VehicleType == "Lorry")
            {
                price = 80;
            }
            else
            {
                price = 15;
            }

            refunded = price * vsp.RemainingMonth;
            Console.WriteLine("Total amount of $" + refunded + " is refunded back to you.");
            Console.WriteLine("Your Season Parking Pass has been terminated. Thank you and have a nice day.");
            //User's account will be set to terminated.
            vsp.SetCurrentState(vsp.GetTerminatedState());
            Console.WriteLine("Season pass has been terminated.");
        }