repl.it
@kironroy/

abstractclasses

C#

No description

fork
loading
Files
  • main.cs
  • Circle.cs
  • main.exe
  • notes.txt
  • Rectangle.cs
  • Shape.cs
main.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using System;



namespace AbstractClasses // abstract class when you want to force your design everywhere in the code base
{
    class MainClass
    {
        static void Main(string[] args)
        {
            var circle = new Circle();
            circle.Draw();
            circle.Copy();
            circle.Select();

            var rectangle = new Rectangle();
            rectangle.Draw();
        }


    }
}