prog_asgn2 - Programming Assignment II COP3502H Due: 2/7/07...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Programming Assignment II COP3502H Due: 2/7/07 11:59pm to Web CT The CEO of the Computer Sciences Corporation, Dr. Link Queue has decided that the first product in the company’s arsenal of applications will be a text-based numerical calculator. In this assignment, you will develop a simple calculator that takes mathematical expressions from the user and outputs the results. Your calculator will utilize stacks and postfix notation to perform the computations. Requirements Users of your calculator should be able to enter a mathematical numerical expression as input and the program should print out the result as output. You can do this in one of two ways. The first way is to make the calculator a command line program. Thus, the expression would be passed to the program when the executable is run. For example, if your program is named ‘calc’, it might look something like this: >calc 2+5+7 >Result: 14 The second way is to make the calculator more interactive. You would run the ‘calc’ program and see something like this: >calc Welcome to the Calculator (type ‘Q’ to quit) Enter Expression: 2+2
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 06/12/2011.

Page1 / 3

prog_asgn2 - Programming Assignment II COP3502H Due: 2/7/07...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online