-
-
Save dimitris-papadimitriou-chr/68d59c8aebc926e3aa44eac45c513095 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| abstract class Shape | |
| { | |
| public abstract string GetShapeDescription(); | |
| } | |
| class Rectangle : Shape | |
| { | |
| public int Width { get; set; } | |
| public int Height { get; set; } | |
| public override string GetShapeDescription() | |
| { | |
| return $"Found { Height }x { Width} rectangle"; | |
| } | |
| } | |
| class Circle : Shape | |
| { | |
| public int Radius { get; set; } | |
| public override string GetShapeDescription() | |
| { | |
| return $"found a circle with radius { Radius}"; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment