Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static void Main(string[] args)
- {
- var shapes = new List<Shape>()
- {
- new Rectangle() { Height = 20.5, Width=40.7},
- new Square() { Width = 35.4},
- new Circle() { Radius = 1.5 }
- };
- var shapeCalculations = new ShapeCalculations();
- var totalArea = shapeCalculations.CalculateTotalArea(shapes);
- Console.WriteLine($"Total area: {totalArea}");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement