CodeEasy won’t accept this task even though everything is correct. Tried different numbers including the one used in example and it still doesn’t accept
using System;
namespace Inheritance
{
class GeometricFigure
{
public virtual void Draw()
{
}
}
class Square : GeometricFigure
{
public int Size { get; set; }
public override void Draw()
{
for(int i = 0; i < Size; i++)
{
Console.Write("#");
}
Console.WriteLine();
for(int i = 0; i < Size/2; i++)
{
Console.Write("#");
for(int j = 0; j < Size - 2; j++)
{
Console.Write(" ");
}
Console.Write("#");
Console.WriteLine();
}
for(int i = 0; i < Size; i++)
{
Console.Write("#");
}
Console.WriteLine();
}
}
class Arrow : GeometricFigure
{
public int Length { get; set; }
public override void Draw()
{
for(int i = 0; i < Length - 1;i++)
{
Console.Write("-");
}
Console.Write(">");
}
}
public class DrawMe
{
public static void Main()
{
var size = int.Parse(Console.ReadLine());
var square = new Square { Size = size };
var arrow = new Arrow { Length = size };
square.Draw();
arrow.Draw();
}
}
}