Results 1 to 2 of 2

Thread: Calculator Program

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2006
    Posts
    2

    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.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Calculator Program

    Quote 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
  •  



Click Here to Expand Forum to Full Width