tangorishi / learnJava

LearnJava - Hacktoberfest 2023 ๐Ÿš€ Join us in celebrating Hacktoberfest 2023 by contributing to this Java programming repository! Whether you're a beginner or an expert, dive into Java, share your knowledge, and make Hacktoberfest unforgettable. ๐Ÿ“š๐Ÿ’ป Happy coding and contributing! ๐Ÿš€๐ŸŒŸ
MIT License
28 stars 45 forks source link

Add java code for Number to Word converter #52

Closed Janani-Balasooriya closed 1 year ago

Janani-Balasooriya commented 1 year ago

I am excited to contribute to this repository by adding a Java class NumberToWordsConverter that converts numeric input into words. This class provides a convenient way to transform numbers into their textual representation.

Changes Made:

Technical Details: The NumberToWordsConverter class contains methods to convert integers into their textual representation. It employs various arrays for ones, teens, tens, and thousands places to ensure accurate conversion. The class can handle numbers from 0 to 999 trillion, providing a comprehensive solution for converting a wide range of numeric inputs into words.

Testing Done: I extensively tested the NumberToWordsConverter class with various input values, including edge cases and large numbers, to validate its correctness and reliability. The conversion results were as expected for all test cases, confirming the accuracy of the implementation.

Additional Notes: This contribution aligns with the goals of Hacktoberfest 2023 by adding a valuable utility to the repository. Converting numbers into words is a common requirement in many applications, and this class provides an efficient and reliable solution to address this need. I believe this addition will be beneficial to developers working on projects involving text-based representations of numerical data.

I am open to feedback and suggestions for further improvements. Thank you for considering my pull request.

Happy Hacking! Janani

Janani-Balasooriya commented 1 year ago

Hi @tangorishi My pull request is ready for merging. It has the solution for issue #22 Could you please review it when you have a moment? Thank you!

tangorishi commented 1 year ago

GG @Janani-Balasooriya