[Instructions] [Search] [Current] [Changes] [Syllabus] [Handouts] [Outlines] [Labs] [Assignments] [Examples] [Bailey Docs] [SamR Docs] [Tutorial] [API]
I am highly unlikely to grant extensions on this assignment!
Summary:
In this assignment, you will implement a simple RPN calculator.
Like dc, your calculator should handle arbitrary
precision (or nearly arbitrary precision) numbers.
Collaboration: Each student should turn in his or her own copy of the assignment. You may discuss your design with any size group. You may also work with each other on general debugging issues.
Implement a simple arbitrary-precision reverse-polish-notation desktop calculator that supports the following operations:
p: print the results of the last operation (the value
on the top of the stack).
k: set the number of digits of precision after the decimal
point.
+, -, *, and /: normal
arithmetic operations.
^: exponentiation.
You will most likely want to use the
java.math.BigDecimal class to support your
work. Note that it does not include an exponentiation function, so you
will need to supply your own. You are expected to supply an efficient
implementation.
[Instructions] [Search] [Current] [Changes] [Syllabus] [Handouts] [Outlines] [Labs] [Assignments] [Examples] [Bailey Docs] [SamR Docs] [Tutorial] [API]
Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.
Source text last modified Fri Apr 10 07:56:04 1998.
This page generated on Tue Jan 12 11:44:36 1999 by SiteWeaver.
Contact our webmaster at rebelsky@math.grin.edu