calculator

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jun 2006
Posts: 48
Reputation: Embeza is an unknown quantity at this point 
Solved Threads: 0
Embeza Embeza is offline Offline
Light Poster

calculator

 
0
  #1
Jul 6th, 2006
Hi there ,
I need a calculator that is flexible enough to perform
+,-,/,%,^and *.
can you help plz
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,467
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 267
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: calculator

 
0
  #2
Jul 6th, 2006
If you are suppossed to be writing one, then write one, and if you have a specific problem, check back with us. If you simply want to find one to use, check with Google, there are more than enough out there.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,273
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 378
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: calculator

 
0
  #3
Jul 6th, 2006
Originally Posted by Embeza
Hi there ,
I need a calculator that is flexible enough to perform
+,-,/,%,^and *.
can you help plz
So basically you want a calculator in java which emulates the one in windows.

There should be lots of examples out there, even some which handles more complex crap like RPN notation. I'm feeling bored (holidays) I might write a RPN calculator with a nice gui for fun.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 18
Reputation: N[e]tt[e] is an unknown quantity at this point 
Solved Threads: 0
N[e]tt[e] N[e]tt[e] is offline Offline
Newbie Poster

Re: calculator

 
0
  #4
Jul 15th, 2006
tat easy.. u haf each button add a actionlistener..
and inside the action listener perform the required statements lor.
i did that in my school before
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 48
Reputation: Embeza is an unknown quantity at this point 
Solved Threads: 0
Embeza Embeza is offline Offline
Light Poster

Re: calculator

 
0
  #5
Jul 16th, 2006
For u it might be.There is surely a difference between you and me but the aim of this forum is to exchange ideas.Not to overact and undermine others.
Any way the calculator will be using numbers as input from the buttons as well as from a text file.
That is to say the file will have random real numbers arranged randomly.You have to input thos numbers from the file.
For example if the file has "3,7.9,-9.3,100" then the user has to choose which numbers to take as operands.Its a kind of assigning the text into a string variable, splitting it into parts and manipulating with the elements of the array of the strings.

Originally Posted by N[e]tt[e]
tat easy.. u haf each button add a actionlistener..
and inside the action listener perform the required statements lor.
i did that in my school before
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: calculator

 
0
  #6
Jul 17th, 2006
The idea is to help others, not to enlist them to do your homework for you.
You showed no interest at all in doing anything of your own, just sitting back and waiting for a complete solution to be handed to you on a golden platter.

That's not going to fly, especially since you're not paying us consultancy fees (at $150 an hour per person for a minimum of 80 hours per person).
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,273
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 378
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: calculator

 
0
  #7
Jul 19th, 2006
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 48
Reputation: Embeza is an unknown quantity at this point 
Solved Threads: 0
Embeza Embeza is offline Offline
Light Poster

Re: calculator

 
0
  #8
Jul 19th, 2006
Thank you for your solutions
But I dont know java very well.
What I know is VB 6.0 and VB.NET
and also as to the content of your hard work you have developed a converter(to number from string).That is good but i need inputs to be selected randomly from the file.
The only thing I should ask everybody is how to select interest operands i.e any operands of interest from the text file.
Thank you.
Embeza
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,273
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 378
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: calculator

 
0
  #9
Jul 19th, 2006
and also as to the content of your hard work you have developed a converter(to number from string).That is good but i need inputs to be selected randomly from the file.
The only thing I should ask everybody is how to select interest operands i.e any operands of interest from the text file.

Hullo, can you please explain this in greated detail with an example.

Reading from a file is simple when you know how. But what does the file input look like?
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: calculator

 
0
  #10
Jul 23rd, 2006
So you helped the kid by doing his homework for him, now he can claim a decent grade for doing no work at all.
What does that do for the profession, except causing even more unqualified idiots to enter the marketplace?
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 4456 | Replies: 22
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC