4 ms·
That's the kicker -- order of operations wasn't a requirement (and probably wouldn't have been allowed) either. Maybe I should have put a mode button on it so
by derekp7 12y ago
That's the kicker -- order of operations wasn't a requirement (and probably wouldn't have been allowed) either. Maybe I should have put a mode button on it so that you can select the desired mode.
But that experience did teach me a valuable lesson -- always follow the specifications as close as possible, don't try to innovate (unless working on your own projects). And, I've learned to spot (and explain) contradictory / intractable specifications up front.
- jacquesm 12y agoIn a way it is a pity that that was your take home lesson. You deserved an A++ and the take home should have been that going the extra mile gets rewarded.
- derekp7 12y agoI did have a couple other classes that were a bit better -- Assembly (BAL on an IBM Mainframe), in which the instructor presented an award to me at the end of the semester, my very own pocket protector. And a C class I took, had a similar calculator project, so I ended up doing a parse tree with recursive evaluation in order to do handle operator precedence and parentheses. In that class, the instructor made handouts out of my homework assignment to go over as an example of good programming technique and an intro to algorithms for the rest of the class. Made me feel special at the time.
- gayprogrammer 12y agoYet, in CS courses it doesn't. An A+ means you passed all of the automated tests.