Question: In this programming activity, you will create a colorful pattern of shapes and letters. At a minimum it needs to include randomly colored circles and

In this programming activity, you will create a colorful pattern of shapes and letters. At a minimum it needs to include randomly colored circles and squares with centered randomly colored letters in the center of each shape. No matter what color the shape is, the color of the letter should make the letter visible.

The application will be interactive in that it will modify all shapes, letters, and colors each time a Randomize button is pressed. Note that the shapes, letters and colors should not randomize in response to events like the windows resizing.

Your Mosaic implementation could look something like:

Specific requirements for the application include:

Requirement 1

Create an application that:

  1. Is implemented in multiple Java (.java) files with the main file named Mosaic.java
  2. Successfully compiles from the command line using javac *.java and executes by typing java Mosaic

Requirement 2

Be sure that application also:

  1. Has a simple yet an aesthetically pleasing user interface
  2. Creates and draws a 12x12 grid of circles and squares of random colors
  3. Resizes each circle and square as the window is resized
  4. Retains the color of each shape as the window is resized

Requirement 3

Enhance the application so that when it starts it:

  1. Draws a capital letter at the center of each shape
  2. Draws the letter in a visually appealing color
  3. Maintains the capital letter at the exact center of the shape as the windows is resized
  4. Retains the color of each letter as the window is resized

Requirement 4

Enhance the application so that it:

  1. Implements a Randomize button
  2. Re-randomizes all of the shapes, letters, and colors when the button is pressed
  3. Responds to a mouse click on shape by replacing that shape and letter with a FaceDraw face
  4. Responds to a mouse click on a FaceDraw face by returning it to its previous shape, letter, and color

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!