CSCI 161 Assignment 1, Spring 1997 DUE: The assignment is due on or before 3am, Thursday January 30. This assignment is worth 20 objective points. Your solution will be graded on the basis of its run-time behaviour and on the clarity and simplicity of the source code. See the marking guide in ~csci161/Pex1/markingGuide. With regard to simplicity and clarity, follow the ASAP principle: as simple as possible. INSTRUCTIONS: Issue the command: cp -r ~csci161/ICalc . to copy the application directory to your account. Locate to ICalc and use the Makefile to test, verify and submit you assignment. This assignment is to completed by each student. Submit only one implementation; if you send more than one, we will discard all but the last one. The assignment identifier is CSCI 161 Pex 1 (see Course Information Sheet). Your assignment must be received before the due date and time. In addition, your e-mail must have the assignment identifier as its subject. All other methods of submission will not be accepted. You will receive no credit for an assignment submission that fails to adhere to this convention. QUESTION: Description =========== You task is to develop a simple postfix calculator Sample Output (assume PSMAXSIZ=2) ============= malun1.mala.bc.ca> icalc Enter the postfix expression: 2 3 + 4 * Ans is 20 malun1.mala.bc.ca> icalc Enter the postfix expression: 4 2 3 + * Stack Overflow, program aborted malun1.mala.bc.ca> Preconditions/Restrictions ======================== You may assume that the user inputs a well-formed postfix expression. The expression will be on a single line. It will contain single digit numbers (or operands) and the operator symbols '*', '+', 'm' and 'M'. All of the operators are binary (they take 2 operands). Operands and operators are separated by one or more blank characters. The operators '*' and '+' are Pascals standard multiplication and addition operators. The operator 'm' returns the minimum of its operands. The operator 'M' returns the maximum of its operands. You must use the Math and PStack modules to advantage. You need not check for stack underflow (since we assume that the expression is well-formed). However, you MUST check and report stack overflow. Test Set ======== see ~csci161/ICalc/tinp