|
-
Nov 15th, 2006, 04:12 PM
#1
Thread Starter
New Member
Calculator Program
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|