public class Area {
public double rectangleArea(double width, double height) {
return width * height;
}
public double triangleArea(double base, double height) {
return base * height * 0.5;
}
public double circleArea(double radius) {
return Math.PI * radius * radius;
}
}
Comments
Leave a comment