6.07 - Colored circle

Objetive
Expand the January 10th exercise (shapes + square), so that it can also store data about "Colored Circles":

Resolution
using System;
namespace shapes
{
    class ColoredCircle : Circle
    {
        protected int color;
        public ColoredCircle() 
        {
            
        }
        public ColoredCircle(double dX,double dY,double dRadius,int color )
        {
            this.dX = dX;
            this.dY = dY;
            this.dRadius = dRadius;
            this.color = color;
        }
        
        public void Move()
        {
            
        }

        public void Scale()
        {
            
        }

        public string ToString()
        {
            return "";
        }
        
        public int GetColor() 
        {
            return 0;
        }
        
        public void SetColor(int newColor)
        {
            color = newColor;
        }
        
        public override double Area() 
        {
            return 0;
        }
        public override double Perimeter()
        {
            return 0;
        }
    }
}


Popular Posts