Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace Shapes
- {
- public class Circle : Shape
- {
- public Circle(double radius)
- {
- Radius = radius;
- }
- public double Radius { get; protected set; }
- public override double CalculateArea()
- {
- return Math.PI * Radius * Radius;
- }
- public override double CalculatePerimeter()
- {
- return 2 * Math.PI * Radius;
- }
- public override string Draw()
- {
- return base.Draw() + this.GetType().Name;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement