?
Solved

maths formula in a string

Posted on 2003-02-22
5
Medium Priority
?
303 Views
Last Modified: 2013-12-29
im reading in a string form a text field, in which there is a maths formula i.e ((7*7)/8(9*25+1))

i need to work out the answer to what ever formula is entered in by the user,

is there a easy way to do this in java, because i have been thinking about how to do this via my own algorithm and its kinda complex but im proberly going about it the wrong way,

the user can enter in and number and only the four basic mathamatical operators '*','+','-','/', and they can enter in white spaces between the operators,

any help would be greatly appreciated

thanks
0
Comment
Question by:stephencushen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 160 total points
ID: 7998426
0
 

Expert Comment

by:CleanupPing
ID: 9059148
stephencushen:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 7

Expert Comment

by:tomboshell
ID: 9582293
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept CEHJ's comment as answer.

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Thomas Boshell
EE Cleanup Volunteer
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9640651
:-)
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month11 days, 13 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question