using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ch7_2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Circle circle1 = new Circle(72, 22, 4.5);
            Circle circle2 = new Circle(5, 5, 10);
            label1.Text = "Area of circle1 is : " + circle1.Area() + " \n";
            label1.Text += "Perimeter of circle1 is : " + circle1.Circumference();
            label1.Text += "\nArea of circle2 is : " + circle1.Area() + " \n";
            label1.Text += "Perimeter of circle2 is : " + circle1.Circumference();
            label1.Text += "\nCircle construtor called " + Circle.CircleCount + " times";
            label1.Text += "\nPoint constructor called " + Point.Count + " times";
            circle1 = null;
            circle2 = null;
            GC.Collect();
        }
    }
}
