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

namespace ch7_2
{
    class Circle : Point
    {
        private double radius;
        private static int ccount = 0;
        public Circle()
        {
            ccount ++;
        }
        public Circle(int xValue, int yValue, double radiusValue)
            : base(xValue, yValue)
        {
            radius = radiusValue;
            ccount ++;
        }
        ~Circle()
        {
        }
        public double Radius
        {
            get
            {
                return radius;
            }
            set
            {
                if (radius >= 0)
                    radius = value;
            }
        }
        public double Area()
        {
            return 3.14 * Radius * Radius;
        }
        public double Circumference()
        {
            return 2 * 3.14 * Radius;
        }
        public static int CircleCount
        {
            get
            {
                return ccount;
            }
        }

    }
}
