Create User Defined Object (75 points)
This project is very similar to project6 ( area of triangle ).
One major difference is to have your applet call your own user defined
object. Call your applet Project30.java and call your user defined
object Triangle.java. From Project30.java, allow the
user to input the base and height as floats. Triangle.java must contain
a user defined base and height method to accept these values from Project30.java.
It must also use the predefined String toString method to return only the area back to
your applet. ALL output must come from Project30.java.
Also, keep both Project30.java and
Triangle.java, in the same directory. Make sure your project can
produce the sample output below.
- Document your applet. Include your Name, Date, Project#, and a
description of the project.
- Input the data with the TextField class
- Allow all data input to be of type float.
- Activate the calculation with the Button class.
- Output the base, height, and area with the TextArea class and setText method.
Sample Output for Project30.java