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:
- Is implemented in multiple Java (.java) files with the main file named Mosaic.java
- Successfully compiles from the command line using javac *.java and executes by typing java Mosaic
Requirement 2
Be sure that application also:
- Has a simple yet an aesthetically pleasing user interface
- Creates and draws a 12x12 grid of circles and squares of random colors
- Resizes each circle and square as the window is resized
- Retains the color of each shape as the window is resized
Requirement 3
Enhance the application so that when it starts it:
- Draws a capital letter at the center of each shape
- Draws the letter in a visually appealing color
- Maintains the capital letter at the exact center of the shape as the windows is resized
- Retains the color of each letter as the window is resized
Requirement 4
Enhance the application so that it:
- Implements a Randomize button
- Re-randomizes all of the shapes, letters, and colors when the button is pressed
- Responds to a mouse click on shape by replacing that shape and letter with a FaceDraw face
- 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
Get step-by-step solutions from verified subject matter experts
