|
-
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.
-
Nov 15th, 2006, 05:05 PM
#2
Re: Calculator Program
 Originally Posted by tdogg04
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.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
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
|