Write a method totalCircleArea that uses stream operations to compute and return the sum of the areas

Question:

Write a method totalCircleArea that uses stream operations to compute and return the sum of the areas of a group of circles, rounded to the nearest whole number. Your function accepts an array of real numbers representing the radii of the circles. For example, if the array is {3.0, 1.0, 7.2, 5.5}, return 289.0. Recall that the area of a circle of radius r is π r2.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: