CMIS 102A
Add to the IntVariable.java program a calculation of the perimeter and
area of a rectangle. Have variables to store the width and height of
the rectangle. Calculate the perimeter and assign it to an
appropriately named variable (hint: some name like "perimeter").
Calculate the area and assign it to a meaningfully named variable.
Output the results.
Turn your IntVariable.java program into an applet. (Add to it the
"incantations" for an applet.)
Use g.drawString to display the calculated values.
Add to it variables for the radius, area, and circumference of a
circle. Use type double intead of type int. double is for real
numbers (i.e. numbers that have a decimal point). Initialize the
radius to 1.0. Write assignment statements that calculate the area
and circumference of the circle of that radius and assign the values
to the appropriate variables. Display the values. Use Math.PI for
pi.
Make it look like the HelloApplet of the class web site.
(displaying the rectangle and circle values).
Upload to your web site. Make sure it runs from the browser.