Advertisement
wingman007

C#_OOP_2a_Program.cs

Mar 22nd, 2014
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace OOPGeometry2
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             Triangle triangle = new Triangle(10.0, 15.0);
  13.             Rectangle rectangle = new Rectangle(5.0, 10.0);
  14.             Circle circle = new Circle(12.0);
  15.  
  16.             Manager manager = new Manager(triangle);
  17.             manager.TellTheSurface();
  18.  
  19.             manager.Figure = rectangle;
  20.             manager.TellTheSurface();
  21.  
  22.             manager.Figure = circle;
  23.             manager.TellTheSurface();
  24.  
  25.             Console.WriteLine("Hello");
  26.             Console.Read();
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement