Advertisement
Guest User

Untitled

a guest
Nov 14th, 2021
122
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace Shapes
  6. {
  7. public class Circle : Shape
  8. {
  9. public Circle(double radius)
  10. {
  11. Radius = radius;
  12. }
  13.  
  14. public double Radius { get; protected set; }
  15. public override double CalculateArea()
  16. {
  17. return Math.PI * Radius * Radius;
  18. }
  19.  
  20. public override double CalculatePerimeter()
  21. {
  22. return 2 * Math.PI * Radius;
  23. }
  24.  
  25. public override string Draw()
  26. {
  27. return base.Draw() + this.GetType().Name;
  28. }
  29. }
  30. }
  31.  
Advertisement
RAW Paste Data Copied
Advertisement