/Problem6_MaerskJavaTasks

Six java coding challenges for the beginners level by Maersk for Sparta Global Academy.

Primary LanguageJavaMIT LicenseMIT

Problem 6: Integer Palindrome (MaerskJavaTasks)

  • Number Six of the six java coding challenges for beginners by Maersk for Sparta Global Academy.

Check if given Integer is palindrome or not. An integer is called palindrome if it's equal to its reverse, e.g. 1001 is a palindrome, but 1234 is not because the reverse of 1234 is 4321 which is not equal to 1234.Please write the unit tests for your solution using any of the unit testing framework.

Instructions to build and run the code

1. Open the project in Intellij
2. Navigate to the App.java file in the project explorer
3. Run the main method
  • Note: App.java can be found in Problem6_MaerskJavaTasks\IntegerPalindromes\src\main\java\com\spartaglobal\em\engineering50\App.java

  • In main, the isIntegerPalindrome() method accepts an integer as an input and returns True is the integer is a "palindrome" and False otherwise.

Platform limitations

  • No notable limitations for Intellij.

Dependencies

Assumptions

  • Assumed that negative integers are not palindromes.

Highlights

  • Code Coverage on IntegerPalindrome class methods: 100% lines: 100%.

Improvements

  • Could be implemented in a generic way.