|
|
|
|
Java Calculator (Basic)
Posted:
Apr 29, 2007 10:11 AM
|
|
|
Hi can anyone help me on this i have to do a basic calculator with Java that contain two integer fields and an array,results. It should be capable of adding 2 numbers, subtracting 2 numbers, dividing 2 numbers, and multiplying 2 numbers, and giving the remainder after division of the two integer numbers, any help would be greatly appreciated, thank you.
|
|
|
|
|
|
|
Re: Java Calculator (Basic)
Posted:
Apr 30, 2007 5:54 AM
in response to: shanezz
|
|
|
homework?
|
|
|
|
|
|
|
|
Re: Java Calculator (Basic)
Posted:
Apr 30, 2007 7:16 AM
in response to: shanezz
|
|
|
ill help you .. but i would need you to post up what you have written so far.. and a description of the problem your running into
|
|
|
|
|
|
|
|
Re: Java Calculator (Basic)
Posted:
Apr 30, 2007 9:55 AM
in response to: shanezz
|
|
|
A fundamental idea of homework is that one does his own. That is, you, not we, do your homework.
And to all the ones who want to be helpful, consider this. Imagine you become a professional developer. Do you want to work with colleagues who got their programming credentials by letting others do their homework? Do you want to have to do their work in addition to your own, because they are used to others doing their work and can't deliver?
|
|
|
|
|
|
|
|
Re: Java Calculator (Basic)
Posted:
Apr 30, 2007 10:03 AM
in response to: ewin
|
|
|
Most developers get annoyed by people asking for help.. we are very much in a solve it your self mentality.
i however will gladly help a person.. assuming they in turn do the work.. i can guide and teach.. NOT do.
For exactly the reason mentioned above
|
|
|
|
|
|
|
|
Re: Java Calculator (Basic)
Posted:
Apr 30, 2007 4:24 PM
in response to: shanezz
|
|
|
Apple's section for developers has half a dozen different currency converter examples, which is similar to the calculator you describe. I think one of the Objective-C books has a calculator that it builds up as an example as well.
The 'trick' with a calculator is to keep some kind of rolling total.
|
|
|
|
|
|
|
|
Re: Java Calculator (Basic)
Posted:
Apr 5, 2009 10:48 AM
in response to: shanezz
|
|
|
This applet accomplishes a couple of different things: obviously, it is an example of a calculator, but also displays an example of how to multithread an applet. The Time Used display on the left-hand side near the bottom is a thread ran from within the applet itself.
The Current Time display on the right-hand side near the bottom is a thread that was declared in class called "Clock" which extended Thread. It is instantiated within the applet and the overridden run method inside of the Clock class obtains the current time for display.
The calculator itself has been set up to handle keyboard events, but as far as the program is concerned the focus must be on the applet in general -- the keystrokes won't work otherwise. To do this, click on any empty area of the applet. ------------ mukesh11 Currency Converter - Currency Converter
|
|
|
|
|