PDA

Click to See Complete Forum and Search --> : Calculator Program


tdogg04
Nov 15th, 2006, 04:12 PM
This is the code for my calculator program, please help FAST!


Write a calculator class that accepts equations as input, e.g.
1 + 6 * 9 – 12 / 4 =
Rules:
- an equation is entered as in the example above
- the operators +, -, *, /, and = are to be known by the calculator
- all operands are numbers of type double
- operators and operands are entered separated by spaces
- the equals sign ends the input; pressing return causes the result to be displayed
- calculations are to be done following the rules of operator precedence
- input can be as long as desired as long as it follows the above rules

The program will consist of two parts: a class for the calculator with all methods and data needed to solve the problem, and a main program that uses the calculator class. Your program must follow the OOP paradigm and must implement (several) methods sensibly.

CornedBee
Nov 15th, 2006, 05:05 PM
This is the code for my calculator program, please help FAST!
No, that's the specification. The code is something you must write. We'll help you with specific problems, but we won't write it for you.