Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace ConsoleApp7
- {
- // Ex01 - P026
- class Polygon
- {
- private int n;
- private Line[] lines;
- Polygon(Line[] lines_array)
- {
- // add your code here
- }
- public double getPerimeter()
- {
- double sum = 0;
- for (int i = 0; i < n; i++)
- {
- sum = sum + lines[i].getLength();
- }
- return sum;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement