P17. (Triangles) Exercise P8.9, p 365.
Submit this as program 17
using the electronic submission.
Include the classes Program17 and Triangle as separate files.
Include an HTML file in the directory called Program17.html
that displays your applet.
Note: Your Program17 class should contain a sample
program that demonstrates the features of the Triangle class.
It should not ask for input, but it should draw several triangles,
move them, and redraw them.
P18. (Three Color Draw)
Modify the OneColorDraw applet to
allow the user to change colors that are drawn.
Add at least 3 choices of colors and buttons for
each choice. For example, if you choose the
colors red, blue, and black, you should have buttons
that when pressed, change the color that is drawn
to red, blue, or black, respectively. Your applet
should also have a clear button like OneColorDraw.
For example:
Submit this as program 18
using the electronic submission. Please call the
file (and the class) Program18.
Include an HTML file in the directory called Program18.html
that displays your applet.