The debits and credits aren't so much trouble, but setting up the file access protocol for my program is a bear. I think a solid day would be a big step forward - unfortunately I don't have day.
For work, I've spend the last 12 hours programming a calculator. It's a lot harder than it looks. Most of the time was just trying to figure out how things were supposed to work together. Simple you say? Only a calculator you say? Let me share but one of the problems I had. I STARTED with a simple order of operation, on 3 separate calculators, along with their results. I posted my final version at the bottom.
# - is any number you enter - I tend to use nine because it is the easiest for me to reach.
() - between the parenthesis is the result of the buttons pressed. Try it out on your calculator. See what format you get into. My second boss was also following along on a second calculator and had a different format than listed, but I didn't bother to catalog it, since my boss had already decided on a general format by then.
Casio Calculator
#= (#)
#/= (1/#)
#*= (#*#)
#+= (#)
#-= (#-#)
Window Calculator
#= (#)
#/= (#/#)
#*= (#*#)
#+= (#+#)
#-= (#-#)
Adv Calculator - our old software's calculator
#= (0)
#/= (#/0)(Divide by zero error)
#*= (#*0)
#+= (#+0)
#-= (#-0)
The calculator format my boss chose and I programmed
#= (#)
#/= (#)
#*= (#)
#+= (#)
#-= (#)
Such simple operations vary so much. The more involved such as a double equals, square root, percentage, varied drastically. The "%" especially was loco - though the button looked the same on different calculators, they didn't even do close to the same operations.
No comments:
Post a Comment