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