Jump to content

Can you help me with this Java question? (Quiz Tomorrow)

MeltyMoon

I'm taking a computer science class in my highschool and my teacher wasn't able to see me for extra help today. I have a quiz tomorrow with a question like this on it, can anyone help me study by solving this example question? I would greatly appreciate it :)

Here's the rundown of the question;

The client supplies a string that contains a mathematical sentence, using the various operators (so +,-,*,/) an example would be 3.4*5+6-6.7

The method should return a String value that is simplified and follows the rules of PEMDAS.

 

I understand how to use Double.parseDouble() would be used to convert the string to a double value, along with most of the indexOf variants,  however the syntax of the code required for this question confuses me. 

Can anyone help? You'd be doing a student a huge favor! :)

CPU Overclocking Database <------- Over 275 submissions, and over 40,000 views!                         

GPU Overclocking Database                                                    

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×