troubleshooting Question

pass x*x*x - 3*x*x +5*x + 8 in HTML file so java make it a single-variable polynomial

Avatar of jxharding
jxharding asked on
2 Comments2 Solutions254 ViewsLast Modified:
hi, i need to parse the string x*x*x - 3*x*x +5*x + 8; so that i can pass it into HTML and java knows what to do with it.

here is a question that i can do: (correct and verified) it has to do with the question that im asking
y = 0.5 x ^ 3 = x * x * x * 0.5                                             ^
// Class PlotD plots y = x^3 - 3x^2 + 5x + 8
public class PlotD extends Plotter {
public double func(double x) {
return x*x*x - 3*x*x +5*x + 8;

this one i need help on :
Now i have a generic plotter question:
write a generic plotter applet that takes a parameter func that represents a single-variable polynomial function and plots the function.
For example, the input might be in the form
x^3 - 3 * x^2 +5*x + 8
somehow in the html file it seems i need to pass this value and somehow parse it so that java knows what to make of it.

     <TITLE> The Plotter Applet </TITLE>
<BODY BGCOLOR=black TEXT=white>
    <H1> The Plotter Applet</H1>
        <APPLET CODE=PlotD.class
               WIDTH=1250 HEIGHT=1150>
        <PARAMETER NAME=myval VALUE=x*x*x -3*x*x + 5*x + 8 >

one i cant do:
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros