A few days ago, Michael Kaplan posted a blog titled Why that is positively Ethiopic! in which he talks about Ethipoic numbers, and offers a challenge: write an app which is able to convert to/from Ethiopic numbers.
It didn't take much to convince me to give it a shot, and you can download the fruits of my efforts by clicking here. You can also see a screenshot of the app here:
The code is slightly modified from the one I posted in the comments of Michael's blog, mostly I renamed the
EthiopianNumber class to
NumberConverter, and rearranged it to be a bit more generic and easier to understand. What I really wanted to do is re-do the main algorithm, now that I understand the problems a bit better (I pretty much just wrote the algorithm for
FromEthiopian as I went, and added to it as I found more cases it had to handle). Now that I know all the problems, I could probably do a much more efficient and easy-to-understand version, but I think instead I'll just leave it as an exercise for the reader :)