Skip to content

Added function and fixed bug in PerfectCube.java#3655

Merged
debasishbsws merged 6 commits into
TheAlgorithms:masterfrom
TaranjeetSinghKalsi:patch-7
Oct 29, 2022
Merged

Added function and fixed bug in PerfectCube.java#3655
debasishbsws merged 6 commits into
TheAlgorithms:masterfrom
TaranjeetSinghKalsi:patch-7

Conversation

@TaranjeetSinghKalsi

Copy link
Copy Markdown
Contributor

Added another function to PerfectCube.java and fixed a testing mistake in line number 9

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Java files are placed inside an existing directory.
  • All filenames are in all uppercase characters with no spaces or dashes.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

Added another function to PerfectCube.java and fixed a testing mistake in line number 9

@siriak siriak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The code looks good, could you please add some JUnit tests? (see https://github.com/TheAlgorithms/Java/tree/master/src/test/java/com/thealgorithms)

Created PerfectCubeTest.java
Fixed bug in PerfectCube.java in isPerfectCube() function for negative numbers. Now It gives the correct output for perfect negative numbers.
@TaranjeetSinghKalsi TaranjeetSinghKalsi changed the title Added another function to PerfectCube.java Added function and fixed bug in PerfectCube.java Oct 25, 2022
@TaranjeetSinghKalsi

TaranjeetSinghKalsi commented Oct 25, 2022

Copy link
Copy Markdown
Contributor Author

The code looks good, could you please add some JUnit tests? (see https://github.com/TheAlgorithms/Java/tree/master/src/test/java/com/thealgorithms)

Thanks, I have added JUnit tests and also fixed a bug in isPerfectCube() function for negative numbers. Kindly look after it.

@TaranjeetSinghKalsi TaranjeetSinghKalsi left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added Junit Tests. Kindly review it @siriak @yanglbme @debasishbsws

Comment thread src/main/java/com/thealgorithms/maths/PerfectCube.java Outdated
@TaranjeetSinghKalsi
TaranjeetSinghKalsi requested review from debasishbsws and siriak and removed request for debasishbsws and siriak October 27, 2022 19:17

@siriak siriak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, thanks!

@siriak
siriak requested a review from debasishbsws October 29, 2022 06:03
@siriak

siriak commented Oct 29, 2022

Copy link
Copy Markdown
Member

@debasishbsws please review

@debasishbsws debasishbsws left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good

@debasishbsws
debasishbsws merged commit 957f633 into TheAlgorithms:master Oct 29, 2022
@TaranjeetSinghKalsi
TaranjeetSinghKalsi deleted the patch-7 branch October 29, 2022 13:01
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