12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Jint.Tests.Runtime.Domain;
- namespace Shapes
- {
- public abstract class Shape
- {
- public abstract double Perimeter();
- public Colors Color { get; set; }
- }
- public class Circle : Shape
- {
- public enum Kind
- {
- Unit,
- Ellipse,
- Round = 5
- }
- public Circle()
- {
- }
- public Circle(double radius)
- {
- Radius = radius;
- }
- public double Radius { get; set; }
- public override double Perimeter()
- {
- return Math.PI*Math.Pow(Radius, 2);
- }
- }
- }
|