Kotlin Fraction Calculator Challenge
A minimalistic console program, doing complex mathematical operations on fractions.
FAQs
Why?
This was a take-home task when applying to a software engineering position. It was an outstanding challenge, focusing on pure SE skills. :)
Can I try it?
Sure! Download the project directly from GitHub and run it with your Kotlin/Java IDE of choice. You could even use online editors and playgrounds if you wish to.
When?
Back in May of 2023. I spent around 2 days with this project.
Biggest challenge?
Handling a lot of edge-cases with these types of tasks isn't really maintainable so you gotta make sure you have a robust implementation and structure in the first place.
How?
Written in Kotlin. Parses the inputs, does some regex magic, math, and returns an operation result.
-15/10 / 2/3 = -2&1/4
Best parts?
I feel that leveraging Kotlin's operator overriding in data structures for handling fraction operations was a smart move that paid its dividends in the end. :)