Welcome! Log In Create A New Profile

Advanced

Assignment 4, Ex 7.2

Posted by sanjivdo 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Assignment 4, Ex 7.2
July 10, 2007 09:15PM
Hi

I don't think I understand the question. Are we supposed to create an applet that plots any function. The function will be value in the parameter element in the HTML page. Is this correct?

I created the applet to plot a function but how do I create the function. I am confused. If the function is the parameter from the html, how do I create the function in code? If I use the getParameter() method it returns a string. Am I supposed to look at each character in the string and then try and interpret what to do?

Sanjiv
Re: Assignment 4, Ex 7.2
July 15, 2007 09:35AM
Yes, from my understanding what you've said is all correct. The parameter will be passed in from the HTML page via the parameter tag. Once you have the function (represented in string format) in the applet, you have to interpret the function and plot its values. I'm not sure if I am correct here but just starting this question and this is the (current) path I'm taking.
Re: Assignment 4, Ex 7.2
July 25, 2007 01:09PM
Has anyone made further progress with this question?
I have no idea how to manipulate the string from x^3-3*x^2+5*x+8 into (Math.pow(x,3)) - (3 * (Math.pow(x,2)) + (5 * x) +8).

Suggestions anyone?
Re: Assignment 4, Ex 7.2
July 25, 2007 03:33PM
HI

I am going to try and convert it to post fix notation and then parse the string. In COS211 assignment 2 there was a question to convert from prefix to postfix. Convert that code from c++ to java. Not sure if this will work. I am going to try it this weekend.

Sanjiv
Re: Assignment 4, Ex 7.2
July 30, 2007 10:14AM
FYI, i've posted a separate thread on this forum giving another algorithm.
KH
Sorry, only registered users may post in this forum.

Click here to login