using System;
using System.Collections.Generic;
using System.Text;

namespace Gyak5
{
    internal class Area
    {
        private double squareKm;

        public delegate void SusValueEvent(double oldValue, double newValue);
        public event SusValueEvent SuspiciousValueSet;

        public double SquareKm { 
            get { return squareKm; }

            set {
                if (value < 0) { 
                    throw new Exception("A terület nem lehet negatív!");
                }

                if (value > 10000) {
                    SuspiciousValueSet?.Invoke(squareKm,value);
                }
                squareKm = value;
                    
            }
        }
    }
}
