I need help about a String Calculator

Reply

Join Date: Aug 2008
Posts: 29
Reputation: letlet_pogs has a little shameless behaviour in the past 
Solved Threads: 1
letlet_pogs letlet_pogs is offline Offline
Light Poster

I need help about a String Calculator

 
0
  #1
Aug 29th, 2008
hello,,can you help me with my problem??if it's okey for you,,,

right now,,we are required to make a calculator using only string..ex:

i can only use the imports: JOptionPane/BufferedReader

Input
Mathematical String: 2 + (3*2)

Output
Result: 8

how can i implement the codes??our told us that we should make an algo of it,,but i don't know how,,help guyzz...do you know any other sites that could really help me about this problem??i also want to learn...thank you again...
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,266
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: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: I need help about a String Calculator

 
0
  #2
Aug 29th, 2008
Google java rpn,

or shunting yard algorithm
Last edited by iamthwee; Aug 29th, 2008 at 11:15 am.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 29
Reputation: letlet_pogs has a little shameless behaviour in the past 
Solved Threads: 1
letlet_pogs letlet_pogs is offline Offline
Light Poster

Re: I need help about a String Calculator

 
0
  #3
Aug 29th, 2008
thank you very much,,,this is a great help...
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 1,668
Reputation: javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all 
Solved Threads: 225
Featured Poster
javaAddict's Avatar
javaAddict javaAddict is offline Offline
Posting Virtuoso

Re: I need help about a String Calculator

 
0
  #4
Aug 29th, 2008
As you say in one of you other posts, if you are new and don't know how to make code,
start by writing simpler codes
Check out my New Bike at my Public Profile at the "About Me" tab
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 412
Reputation: sciwizeh is on a distinguished road 
Solved Threads: 22
sciwizeh's Avatar
sciwizeh sciwizeh is offline Offline
Posting Pro in Training

Re: I need help about a String Calculator

 
0
  #5
Aug 29th, 2008
a lot of people ask this, there is a thread on it already, under a different name i need to make it a snippet, HERE IS A LINK:LINK
My site, random PM's from people I haven't hear from before will be DELETED
"If people are good only because they fear punishment, and hope for reward, then we are a sorry lot indeed.",
"If we knew what it was we were doing, it would not be called research, would it? "
-Albert Einstein
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 29
Reputation: letlet_pogs has a little shameless behaviour in the past 
Solved Threads: 1
letlet_pogs letlet_pogs is offline Offline
Light Poster

Re: I need help about a String Calculator

 
0
  #6
Aug 30th, 2008
thank you thank you very much,,,this is a GREAT gREAT help for me,,,,hehehe,,thank you,,mwuah!!
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 29
Reputation: letlet_pogs has a little shameless behaviour in the past 
Solved Threads: 1
letlet_pogs letlet_pogs is offline Offline
Light Poster

Re: I need help about a String Calculator

 
0
  #7
Aug 30th, 2008
actually i am starting to make codes,,,i know some of them,,,but making a string calculator is our requirement for midterm,,,,

..by the way,,i just want to say sorry if i posted anywhere,,,but thank you all guyz,,,you're a great help!!
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 29
Reputation: letlet_pogs has a little shameless behaviour in the past 
Solved Threads: 1
letlet_pogs letlet_pogs is offline Offline
Light Poster

Re: I need help about a String Calculator

 
0
  #8
Aug 30th, 2008
hello, i have run your codes,,i has no error when it was compiled,,but when i run it,,it said that it has no "main"...i am confused either...
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,191
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 485
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: I need help about a String Calculator

 
0
  #9
Aug 31st, 2008
Because you are supposed to implement main method and just feed user fetched data into provided parser
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Reply

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


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC