Skip to content

Conversation

@krishna-medapati
Copy link
Contributor

Fixes #6936

Description

Added a utility class for temperature conversions between Celsius, Fahrenheit, and Kelvin.

Implementation

  • 6 conversion methods covering all unit combinations
  • Follows the repository's code style and conventions
  • Uses precise conversion formulas

Testing

Comprehensive test coverage including:

  • Standard conversions (0°C, 100°C)
  • Edge cases (-40° where F and C match)
  • Body temperature (37°C / 98.6°F)
  • Absolute zero
  • [ x] I have read CONTRIBUTING.md.
  • [ x] This pull request is all my own work -- I have not plagiarized it.
  • [x ] All filenames are in PascalCase.
  • [ x] All functions and variable names follow Java naming conventions.
  • [ x] All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • [ x] All new code is formatted with clang-format -i --style=file path/to/your/file.java

- Implements conversions between Celsius, Fahrenheit, and Kelvin
- Includes all 6 conversion methods
- Adds comprehensive unit tests with edge cases
- Fixes TheAlgorithms#6936
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.34%. Comparing base (a008cc2) to head (97cfaa0).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7066      +/-   ##
============================================
+ Coverage     78.33%   78.34%   +0.01%     
- Complexity     6670     6677       +7     
============================================
  Files           753      754       +1     
  Lines         22185    22191       +6     
  Branches       4356     4356              
============================================
+ Hits          17378    17386       +8     
+ Misses         4107     4106       -1     
+ Partials        700      699       -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.

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.

[FEATURE REQUEST] Temperature Conversion Utility

2 participants