Why do the statements say 399.0/2.0 instead of 399/2 ?
Answer:
If the latter were used, the integer division would result in errors.
Running Applet
Here is what the applet draws. Even though it has been drawn with a series of short straight line segments, the curve looks smooth.
|
Embedded Java applet removed: modern browsers do not support Java applets. The surrounding source code is retained for historical study.
|
QUESTION 12:
Can you think of ways to improve this program?