Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- abstract class AreaClass
- {
- abstract public void Area();
- }
- class Square : AreaClass
- {
- int a;
- public Square(int a)
- {
- this.a = a;
- }
- public override void Area()
- {
- Console.WriteLine(a * a);
- }
- }
- internal class Program
- {
- static void Main(string[] args)
- {
- Square s = new Square(4);
- s.Area();
- Console.ReadKey();
- }
- }
Add Comment
Please, Sign In to add comment