Console based fractional calculator written in Java