Skip to content

Instantly share code, notes, and snippets.

@shelajev
Created August 28, 2019 12:35
Show Gist options
  • Save shelajev/54a5b4c95e52fc35cb4e844e6e7123bb to your computer and use it in GitHub Desktop.
Save shelajev/54a5b4c95e52fc35cb4e844e6e7123bb to your computer and use it in GitHub Desktop.
static double computeArea(Shape[] all) {
double sum = 0;
for (Shape shape : all) {
sum += shape.area();
}
return sum;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment