4 ms·
Was given the task to build a simple calculator app as a project for a Java class I took in college. No parens or anything like that, nothing nearly so fancy.
by donatj 2y ago
Was given the task to build a simple calculator app as a project for a Java class I took in college.
No parens or anything like that, nothing nearly so fancy. Classic desk calculator where you set the infix operation to apply to the previous value, followed by the second value of the operation.
It was frankly an unexpected challenge. There's a lot more to it than meets the eye.
I only got as far as rational numbers though. PI accurate to the 8 digit display was good enough for me.
Honestly though, I think it was a great exercise for students, showing how seemingly simple tasks can actually be more complex than they seem. I'm still here thinking about it some twenty years later.