Your intelij project directory should look something like the following:
Lab07
|-- out
`-- src
|-- Circle.java
|-- Point.java
|-- Ring.java
|-- ShapeDrawer.java
|-- ShapeUtilsTester.java
`-- Tester.java
Here are the clases you are to create:
ShapeUtils.Java – A Java class with many static functions that perform various geometric computations on Java objectsDrawSolar.Java – A Java program that creates an image fitting a few key requirementssolar.png – A copy of the type of image your code can generateYou also need to make changes to Circle.java
Key Rules:
/**
* Calculates the average of an array of test scores.
* Returns 0 if the array is null or empty.
*
* @param scores an array of test scores, each in the range [0, 100]
* @param count the number of scores in the array
* @return the average of all scores, or 0 if the array is null or empty
* @throws IllegalArgumentException if count is negative
*
* @author Adriana Picoral
* @version 1.0
*/
public double calculateAverage(double[] scores, int count) {
if (scores == null || scores.length == 0) return 0;
if (count < 0) throw new IllegalArgumentException("Count cannot be negative");
double sum = 0;
for (double score : scores) {
sum += score;
}
return sum / count;
}