/* * Copyright (C) 2016 PTM * * Object Oriented Programming Course Example File. * * Created: 22/01/2016 * Authors: Pasi Manninen */ using System; namespace T4 { /// /// Circle class is one of the used shapes in this app. /// class Circle : Shape { public double Radius { get; set; } public override double Area { get { return Math.PI * Radius * Radius; } } public override double Circumference { get { return 2 * Math.PI + Radius; } } public override string ToString() { return String.Format("{0} Radius={1} Area={2:F2} Circumference={3:F2}", base.Name, Radius, Area, Circumference); } } }