using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ShapesActivity { internal class Square:Shapes { private double length; public Square() { } public Square(string name, string color, int sides, double length) //constructor { base.Name = name; base.Color = color; base.Sides = sides; this.Length = length; } public double Length { get => length; set => length = value; } //encapsulation public override string ToString() //override { return "Name: " + base.Name + "\nColor: " + base.Color + "\nSides: " + base.Sides+ "\nLength: "+this.Length; } public override double computeArea() { return Math.Pow(this.Length,2); } } }