Calculator
Documentation
·
Intent: Build a simple, stylized calculator
using Java that can perform arithmetic, conversions, and store the user’s
history. This program was meant to show basic understandings of Object Oriented
coding.
·
Scope: My job for this calculator was to program
the math, conversions, and history functions for this calculator.
·
Input: The user clicks a number to add it to the
text field, clicks arithmetic symbols to define which function to perform, and
conversion buttons to change a number into a metric like feet or liters. If the
history is clicked, a drop-down list appears showing all the past expressions
performed and their results.
·
Output: with the
exception of the “Del” and “C” button, all buttons and their symbols
appear in the text field or an error exception will appear in the text field.
Clicking the “ =” will give the result of two numbers and the conversion
buttons instantly gives the correct conversion of the number. “Del” removes one
character from the text field and “C” clears the entire text field and any
numbers previously in use.
Guideline
·
Open both the “Main” and “Calculate” files in an
IDE like Eclipse and copy and paste the code into two separate classes of the
same names. Run the program until ready to quit.
You can find my code here: http://pastebin.com/u/zhardyCode
You can find my code here: http://pastebin.com/u/zhardyCode
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home