Question: In this activity, you will create a graphical application that draws random faces in a window. The application will draw 3 to 10 faces. The

In this activity, you will create a graphical application that draws random faces in a window. The application will draw 3 to 10 faces. The faces will have a random width and height that are set to reasonable and visually appealing ranges. The application window size should be initially set to a reasonable size and all faces should draw entirely within the window. You do not have to worry about moving or resizing the faces as the window is resized. Specifically the faces should remain in the same place with the window is resized. Each face should have two eyes and a mouth. The mouth should be randomly smiling, frowning, or in-between.

Your FaceDraw 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 FaceDraw.java
  2. Successfully compiles from the command line using javac *.java and executes by typing java FaceDraw

Requirement 2

Be sure that application also:

  1. Has a simple yet an aesthetically pleasing user interface
  2. Creates and draws multiple graphical faces
  3. Each face should have two eyes and a mouth
  4. The mouth should be smiling, frowning, or be neutral

Requirement 3

Enhance the application so that when it starts it:

  1. Draws between 3 and 10 faces (utilizing a random number)
  2. Randomly determines each faces location, size, and emotion (smile, frown, or neutral)
  3. Determines the number of faces and face characteristics only once at program start
  4. Uses reasonable and visually appealing ranges for all random numbers

Requirement 4

Test and refactor the application so that it implements all appropriate Coding Standards.

PLEASE SHOW OUTPUT SHOW IT RUNS CORRECTLY. Thanks!

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!