Java
Java copied to clipboard
Implemented Complex Number Multiplication in the String folder
Description:
This PR introduces a utility class ComplexNumberMultiplication in Java that multiplies two complex numbers represented as strings.
Features:
- Accepts two complex numbers in the format "a+bi" and "c+di".
- Returns the product as a string in the same format "x+yi".
- Uses the formula: (a + bi) × (c + di) = (ac - bd) + (ad + bc)i.
- Handles positive and negative integer parts.
- Includes a main method.
- [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
Codecov Report
:x: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 77.80%. Comparing base (b312567) to head (717d8f8).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...lgorithms/strings/ComplexNumberMultiplication.java | 0.00% | 9 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #6805 +/- ##
============================================
- Coverage 77.84% 77.80% -0.05%
Complexity 6394 6394
============================================
Files 733 734 +1
Lines 21333 21342 +9
Branches 4183 4183
============================================
- Hits 16607 16605 -2
- Misses 4058 4068 +10
- Partials 668 669 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
hii @DenizAltunkapan @alxkm @yanglbme if you could please review this?
@muskansngh07 Please always add the corresponding test class