Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. class Program
  2. {
  3. static void Main(string[] args)
  4. {
  5. var shapes = new List<Shape>()
  6. {
  7. new Rectangle() { Height = 20.5, Width=40.7},
  8. new Square() { Width = 35.4},
  9. new Circle() { Radius = 1.5 }
  10. };
  11.  
  12. var shapeCalculations = new ShapeCalculations();
  13. var totalArea = shapeCalculations.CalculateTotalArea(shapes);
  14.  
  15. Console.WriteLine($"Total area: {totalArea}");
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement