Skip to content

Conversation

@NUftalem
Copy link

Adds a method to calculate the surface area of a square-based pyramid.
Formula: SA = a^2 + 2 * a * slantHeight
Includes input validation for positive side Length and slant Height.

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.93%. Comparing base (d5289b9) to head (5aefee1).

Files with missing lines Patch % Lines
src/main/java/com/thealgorithms/maths/Area.java 0.00% 7 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6850      +/-   ##
============================================
- Coverage     77.95%   77.93%   -0.03%     
- Complexity     6429     6431       +2     
============================================
  Files           736      736              
  Lines         21476    21483       +7     
  Branches       4204     4205       +1     
============================================
  Hits          16742    16742              
- Misses         4060     4068       +8     
+ Partials        674      673       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

double lateralSurfaceArea = 2 * sideLength * slantHeight;
return baseArea + lateralSurfaceArea;
}
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented surface Area Pyramid() method for square-based pyramid with side length and slant height validation.

@DenizAltunkapan
Copy link
Member

solved in #6853

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants