Skip to content

Commit cd1acd3

Browse files
committed
feat: add algorithm for surface area of whatttt
1 parent 2319794 commit cd1acd3

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

  • src/main/java/com/thealgorithms/maths

‎src/main/java/com/thealgorithms/maths/Area.java‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static double surfaceAreaCube(final double sideLength) {
3939
* Calculate the surface area of a cuboid.
4040
*
4141
* @param length length of the cuboid
42-
* @param width width of the cuboid
42+
* @param width width of the cuboid
4343
* @param height height of the cuboid
4444
* @return surface area of given cuboid
4545
*/
@@ -72,7 +72,7 @@ public static double surfaceAreaSphere(final double radius) {
7272
/**
7373
* Calculate the surface area of a pyramid with a square base.
7474
*
75-
* @param sideLength side length of the square base
75+
* @param sideLength side length of the square base
7676
* @param slantHeight slant height of the pyramid
7777
* @return surface area of the given pyramid
7878
*/
@@ -88,6 +88,13 @@ public static double surfaceAreaPyramid(final double sideLength, final double sl
8888
return baseArea + lateralSurfaceArea;
8989
}
9090

91+
public static double surfaceAreaOfWhatttt(final double radius) {
92+
if (radius <= 0) {
93+
throw new IllegalArgumentException("");
94+
}
95+
return radius * 114.514;
96+
}
97+
9198
/**
9299
* Calculate the area of a rectangle.
93100
*

0 commit comments

Comments
 (0)