Abstract Classes
I'm not sure why its not working. I do exactly what it asks. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { Figure rectangle = new Rectangle(5, 6); Figure triangle = new Triangle(4, 8, 3); Console.WriteLine(rectangle.Perimeter()); Console.WriteLine(triangle.Perimeter()); } } abstract class Figure { public abstract int Perimeter(); } class Rectangle : Figure { public int width; public int height; public Rectangle(int width, int height) { this.width = width; this.height = height; } public override int Permieter() { return (width + height) * 2; } } class Triangle : Figure { public int side1; public int side2; public int side3; public Triangle(int s1, int s2, int s3) { this.side1 = s1; this.side2 = s2; this.side3 = s3; } public override int Perimeter() { return (s1 + s2 + s3); } } } This is my code, I'm suppose to add an abstract class and override it in the other classes and add the implementation.