Thread: Java trouble
View Single Post
Old 2012-09-14, 15:31   Link #4
Flying Dagger
大巧不工
 
 
Join Date: Dec 2003
Your assignment is probably intended for you to familiarize on how to do some UI under awt/swing.

You probably want to find a range to display, then calculate the value for every pixel along the x axis (remember pixel, not along a discrete integer scale). Draw a line from (x,y) to (x,y) in order to make a dot appear (unless they added more to the API, I don't recall being able to paint a single point).

The most difficult part of the assignment is probabl
1) figuring out how to draw things (check out the graphics2d examples in something like this: http://docs.oracle.com/javase/tutori...iew/index.html

2) Figuring out which points to display.

3) if you have to, parse out the polynomial input from a string.
Flying Dagger is offline   Reply With Quote