using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Lab1
{
    class CustomerParking : ParkingType
    {
        public override decimal Calculate(decimal hours)
        {
            hours = Math.Ceiling(hours);
            if (hours < 0)
            {
                throw new ParkingException("Parked for no or negative hours");
            }
            else if (hours > 24)
            {
                throw new ParkingException("Vehicle was parked for too long");
            }
            decimal value = hours * ParkingRate;
            return value;
        }
    }
}
