Implement simple calculations (+. .. *, /, % (mod)). At the very least, you should be able
Fantastic news! We've Found the answer you've been seeking!
Question:
Implement simple calculations (+. .. *, /, % (mod)). At the very least, you should be able
to perform each of these math operations on two numbers. (2+2 should work, but
2+2+2 does not need to just yet).
a. Review string parsing concepts to tokenize the string in your textbox into separate
tokens. If "5 5*20" is in your textbox, pressing = should parse "5.5" and "-20: as
floating point values and """ as the operation to occur between those two values.
There are several ways to do this.
b. waWidgets comes with it's own wixString Tokenizer that you may use, You also have
the option to make your own tokenizer, but this is not recommended for this
assignment.
2. Simple unary operations (Sin, Cos, Tan) should also be implemented, Pressing Sin and 5
should add "Sin 5" to your textbox, and pressing = should result in the Sine of 5.
a, Unary operations should still be added as a string to your text box, Do not
immediately evaluate numbers in your textbox. The equals button should still be
pressed in order to evaluate any expressions, including unary operations.
3. Try to find a way to implement the event table without having everything hardcoded.
You should be able to handle all events in a single event function
to perform each of these math operations on two numbers. (2+2 should work, but
2+2+2 does not need to just yet).
a. Review string parsing concepts to tokenize the string in your textbox into separate
tokens. If "5 5*20" is in your textbox, pressing = should parse "5.5" and "-20: as
floating point values and """ as the operation to occur between those two values.
There are several ways to do this.
b. waWidgets comes with it's own wixString Tokenizer that you may use, You also have
the option to make your own tokenizer, but this is not recommended for this
assignment.
2. Simple unary operations (Sin, Cos, Tan) should also be implemented, Pressing Sin and 5
should add "Sin 5" to your textbox, and pressing = should result in the Sine of 5.
a, Unary operations should still be added as a string to your text box, Do not
immediately evaluate numbers in your textbox. The equals button should still be
pressed in order to evaluate any expressions, including unary operations.
3. Try to find a way to implement the event table without having everything hardcoded.
You should be able to handle all events in a single event function
Related Book For
Elementary Principles of Chemical Processes
ISBN: 978-0471720638
3rd Edition
Authors: Richard M. Felder, Ronald W. Rousseau
Posted Date: