Assignment #4
Due: October 2, 1998
Rectangles and Ovals

In today's laboratory session (10/1/98), construct a java applet that:
  • Embeds an oval inside a rectangle such that the major and minor axes of the oval just barely touch all four sides of the rectangle. The rectangle must not be a square; and the oval and square should be two distinctly different colors;
  • Draw a black line from the lower, left corner of the rectangle to the upper, right corner of the rectangle;
  • Finally, add a phrase that says "This is my box and oval" such that the first letter of the phrase (i.e., "T") is positioned neatly just below the bottom-left corner of the rectangle (see example, below).

Like this: